Mark offloaded functions as parallelized
authorTom de Vries <tom@codesourcery.com>
Tue, 9 Jun 2015 21:14:46 +0000 (21:14 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Tue, 9 Jun 2015 21:14:46 +0000 (21:14 +0000)
2015-06-09  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/65460
* omp-low.c (expand_omp_target): Set parallelized_function on
cgraph_node for child_fn.

From-SVN: r224303

gcc/ChangeLog
gcc/omp-low.c

index 8709621f109d6760a5f1f308f542f2a67ffec2a0..d9d299dcc4cdb4f3894e61bf194c7aef02d02ef1 100644 (file)
@@ -1,3 +1,9 @@
+2015-06-09  Tom de Vries  <tom@codesourcery.com>
+
+       PR tree-optimization/65460
+       * omp-low.c (expand_omp_target): Set parallelized_function on
+       cgraph_node for child_fn.
+
 2015-06-09  Tom de Vries  <tom@codesourcery.com>
 
        * omp-low.c (finalize_task_copyfn, expand_omp_taskreg): Mark function
index 2045e485dbb335d28eedc6d70c5ab4cb06312e38..77716bf6c20c7aaf23f901b796ef18379b6c5102 100644 (file)
@@ -8959,6 +8959,8 @@ expand_omp_target (struct omp_region *region)
 
       /* Inform the callgraph about the new function.  */
       DECL_STRUCT_FUNCTION (child_fn)->curr_properties = cfun->curr_properties;
+      cgraph_node *node = cgraph_node::get_create (child_fn);
+      node->parallelized_function = 1;
       cgraph_node::add_new_function (child_fn, true);
 
 #ifdef ENABLE_OFFLOADING