On Thu, Mar 19, 2015 at 12:02:01PM +0100, Tom de Vries wrote: > +void > +mark_parallelized_function (tree fndecl) > +{ > + cgraph_node *node = cgraph_node::get (fndecl); > + gcc_assert (node != NULL); > + node->parallelized_function = 1; > }
I'm not convinced we need this wrapper, I'd just use cgraph_node::get (fndecl)->parallelized_function = 1; wherever you need to set it. It wouldn't be the first or last flag handled this way. > @@ -1459,10 +1465,6 @@ create_loop_fn (location_t loc) > type = build_function_type_list (void_type_node, ptr_type_node, NULL_TREE); > > decl = build_decl (loc, FUNCTION_DECL, name, type); > - if (!parallelized_functions) > - parallelized_functions = BITMAP_GGC_ALLOC (); > - bitmap_set_bit (parallelized_functions, DECL_UID (decl)); > - More importantly, you aren't marking the function as parallelized here. That most likely defeats the original purpose of the bitmap. Perhaps it is too early to create cgraph node here, but you should ensure that it is done perhaps later in create_loop_fn. Jakub