diff options
| author | Jakub Jelinek <jakub@redhat.com> | 2008-01-19 18:49:46 +0100 |
|---|---|---|
| committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2008-01-19 18:49:46 +0100 |
| commit | 135a171d9eac312352f58e0c09abac9156d9fbda (patch) | |
| tree | c47ee4cdc097d5f98d818d66731d4ecf07beeff8 /gcc/omp-low.c | |
| parent | d7e2fcd0038214e3e3d9301fa7f22cccb54de009 (diff) | |
| download | gcc-135a171d9eac312352f58e0c09abac9156d9fbda.zip gcc-135a171d9eac312352f58e0c09abac9156d9fbda.tar.gz gcc-135a171d9eac312352f58e0c09abac9156d9fbda.tar.bz2 | |
re PR gcov-profile/34610 (ICE with "-fprofile-arcs -fopenmp")
PR gcov-profile/34610
* tree-cfg.c (make_edges): Mark both outgoing edges from
OMP_CONTINUE and from OMP_FOR as EDGE_ABNORMAL.
* omp-low.c (expand_omp_for): Clear EDGE_ABNORMAL bits
from OMP_FOR and OMP_CONTINUE outgoing edges.
* tree-profile.c (tree_profiling): Return early if
cfun->after_tree_profile != 0. Set cfun->after_tree_profile
at the end.
* omp-low.c (expand_omp_parallel): Copy after_tree_profile
from cfun to child_cfun.
* function.h (struct function): Add after_tree_profile bit.
* gcc.dg/gomp/pr34610.c: New test.
From-SVN: r131653
Diffstat (limited to 'gcc/omp-low.c')
| -rw-r--r-- | gcc/omp-low.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 94d63b6..ca00266 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -2497,6 +2497,9 @@ expand_omp_parallel (struct omp_region *region) entry_stmt = last_stmt (region->entry); child_fn = OMP_PARALLEL_FN (entry_stmt); child_cfun = DECL_STRUCT_FUNCTION (child_fn); + /* If this function has been already instrumented, make sure + the child function isn't instrumented again. */ + child_cfun->after_tree_profile = cfun->after_tree_profile; entry_bb = region->entry; exit_bb = region->exit; @@ -3337,6 +3340,16 @@ expand_omp_for (struct omp_region *region) extract_omp_for_data (last_stmt (region->entry), &fd); region->sched_kind = fd.sched_kind; + gcc_assert (EDGE_COUNT (region->entry->succs) == 2); + BRANCH_EDGE (region->entry)->flags &= ~EDGE_ABNORMAL; + FALLTHRU_EDGE (region->entry)->flags &= ~EDGE_ABNORMAL; + if (region->cont) + { + gcc_assert (EDGE_COUNT (region->cont->succs) == 2); + BRANCH_EDGE (region->cont)->flags &= ~EDGE_ABNORMAL; + FALLTHRU_EDGE (region->cont)->flags &= ~EDGE_ABNORMAL; + } + if (fd.sched_kind == OMP_CLAUSE_SCHEDULE_STATIC && !fd.have_ordered && region->cont != NULL) |
