summaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-01-19 17:49:46 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-01-19 17:49:46 +0000
commitb3a3ddece257f50649db88afb8e2248d91fa883b (patch)
treec47ee4cdc097d5f98d818d66731d4ecf07beeff8 /gcc/tree-cfg.c
parentf503118e3c5cee82ad9a2d58f5c6848faaaf4c9a (diff)
downloadgcc-b3a3ddece257f50649db88afb8e2248d91fa883b.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131653 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 8da55ff7cd9..c702502f1a7 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -1,5 +1,5 @@
/* Control flow functions for trees.
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
Contributed by Diego Novillo <dnovillo@redhat.com>
@@ -544,14 +544,19 @@ make_edges (void)
switch (cur_region->type)
{
case OMP_FOR:
+ /* Mark all OMP_FOR and OMP_CONTINUE succs edges as abnormal
+ to prevent splitting them. */
+ single_succ_edge (cur_region->entry)->flags |= EDGE_ABNORMAL;
/* Make the loopback edge. */
- make_edge (bb, single_succ (cur_region->entry), 0);
-
+ make_edge (bb, single_succ (cur_region->entry),
+ EDGE_ABNORMAL);
+
/* Create an edge from OMP_FOR to exit, which corresponds to
the case that the body of the loop is not executed at
all. */
- make_edge (cur_region->entry, bb->next_bb, 0);
- fallthru = true;
+ make_edge (cur_region->entry, bb->next_bb, EDGE_ABNORMAL);
+ make_edge (bb, bb->next_bb, EDGE_FALLTHRU | EDGE_ABNORMAL);
+ fallthru = false;
break;
case OMP_SECTIONS: