aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphbuild.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-06-20 02:18:07 +0000
committerJakub Jelinek <jakub@redhat.com>2008-06-20 02:18:07 +0000
commit8c37ff746f7ff47cd320acfc3b51ef62948bea27 (patch)
treef28feb4e7a51182a0bf7d4ca97a21a4def2af406 /gcc/cgraphbuild.c
parent7c1458910dd3eccd8af1cdfa2394acda9f6396ba (diff)
PR c++/36523
* cgraphunit.c (cgraph_process_new_functions): Don't clear node->needed and node->reachable. * cgraphbuild.c (record_reference): Handle OMP_PARALLEL and OMP_TASK. * omp-low.c (delete_omp_context): Call finalize_task_copyfn. (expand_task_call): Don't call expand_task_copyfn. (expand_task_copyfn): Renamed to... (finalize_task_copyfn): ... this. * testsuite/libgomp.c++/task-7.C: New function. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@136977 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphbuild.c')
-rw-r--r--gcc/cgraphbuild.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c
index e37ca86f51d..19e198344b6 100644
--- a/gcc/cgraphbuild.c
+++ b/gcc/cgraphbuild.c
@@ -62,6 +62,24 @@ record_reference (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
}
break;
+ case OMP_PARALLEL:
+ if (flag_unit_at_a_time)
+ {
+ if (OMP_PARALLEL_FN (*tp))
+ cgraph_mark_needed_node (cgraph_node (OMP_PARALLEL_FN (*tp)));
+ }
+ break;
+
+ case OMP_TASK:
+ if (flag_unit_at_a_time)
+ {
+ if (OMP_TASK_FN (*tp))
+ cgraph_mark_needed_node (cgraph_node (OMP_TASK_FN (*tp)));
+ if (OMP_TASK_COPYFN (*tp))
+ cgraph_mark_needed_node (cgraph_node (OMP_TASK_COPYFN (*tp)));
+ }
+ break;
+
default:
/* Save some cycles by not walking types and declaration as we
won't find anything useful there anyway. */