From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 524 invoked by alias); 22 Apr 2011 00:06:03 -0000 Received: (qmail 515 invoked by uid 22791); 22 Apr 2011 00:06:02 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 22 Apr 2011 00:05:48 +0000 Received: from kpbe20.cbf.corp.google.com (kpbe20.cbf.corp.google.com [172.25.105.84]) by smtp-out.google.com with ESMTP id p3M05k9V009796 for ; Thu, 21 Apr 2011 17:05:47 -0700 Received: from ywi6 (ywi6.prod.google.com [10.192.9.6]) by kpbe20.cbf.corp.google.com with ESMTP id p3M05Zps025865 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 21 Apr 2011 17:05:45 -0700 Received: by ywi6 with SMTP id 6so70867ywi.31 for ; Thu, 21 Apr 2011 17:05:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.214.17 with SMTP id m17mr874037ybg.187.1303430745103; Thu, 21 Apr 2011 17:05:45 -0700 (PDT) Received: by 10.150.57.10 with HTTP; Thu, 21 Apr 2011 17:05:44 -0700 (PDT) In-Reply-To: <20110421203659.GA20360@kam.mff.cuni.cz> References: <20110419225733.GB27564@kam.mff.cuni.cz> <20110419233045.GC27564@kam.mff.cuni.cz> <20110419234949.GA26482@kam.mff.cuni.cz> <20110420003322.GB26482@kam.mff.cuni.cz> <20110421203659.GA20360@kam.mff.cuni.cz> Date: Fri, 22 Apr 2011 01:40:00 -0000 Message-ID: Subject: Re: FDO usability: pid handling From: Xinliang David Li To: Jan Hubicka Cc: GCC Patches Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg01837.txt.bz2 Revised as suggested and committed. Thanks, David On Thu, Apr 21, 2011 at 1:36 PM, Jan Hubicka wrote: >> @@ -730,6 +726,8 @@ void cgraph_clone_inlined_nodes (struct >> =A0void compute_inline_parameters (struct cgraph_node *); >> =A0cgraph_inline_failed_t cgraph_edge_inlinable_p (struct cgraph_edge *); >> >> +void cgraph_init_node_map (void); >> +void cgraph_del_node_map (void); > > Given that you don't even export API for using it, I would go for init_no= de_map/del_node_map > in profile.h. =A0It is nothing generic that needs to be included into hal= f of compiler. >> >> -static struct cgraph_node** pid_map =3D NULL; >> +typedef struct >> +{ >> + =A0struct cgraph_node *n; >> +} cgraph_node_ptr_t; >> >> -/* Initialize map of pids (pid -> cgraph node) */ >> +DEF_VEC_O (cgraph_node_ptr_t); >> +DEF_VEC_ALLOC_O (cgraph_node_ptr_t, heap); > You don't need wrapping struct. =A0In cgraph.h you already have: > DEF_VEC_P(varpool_node_ptr); > DEF_VEC_ALLOC_P(varpool_node_ptr,heap); > DEF_VEC_ALLOC_P(varpool_node_ptr,gc); > so you can use vector of cgraph_node_ptr > > With those changes the patch is OK. >