diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-20 02:18:07 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-20 02:18:07 +0000 |
commit | f6430caa19263f035c754f96bd305e652bafc895 (patch) | |
tree | f28feb4e7a51182a0bf7d4ca97a21a4def2af406 /gcc/cgraphbuild.c | |
parent | 69788d047c55eb200084ab4b27e4097ceb213bfa (diff) | |
download | gcc-f6430caa19263f035c754f96bd305e652bafc895.tar.gz |
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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136977 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphbuild.c')
-rw-r--r-- | gcc/cgraphbuild.c | 18 |
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. */ |