> @@ -730,6 +726,8 @@ void cgraph_clone_inlined_nodes (struct > void compute_inline_parameters (struct cgraph_node *); > cgraph_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_node_map/del_node_map in profile.h. It is nothing generic that needs to be included into half of compiler. > > -static struct cgraph_node** pid_map = NULL; > +typedef struct > +{ > + struct 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. In 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.