diff options
author | Diego Novillo <dnovillo@redhat.com> | 2006-01-30 03:11:29 +0000 |
---|---|---|
committer | Diego Novillo <dnovillo@gcc.gnu.org> | 2006-01-29 22:11:29 -0500 |
commit | 8d9c1aec9dbce27caf524d863e461b6471d2c1d6 (patch) | |
tree | 1d6083952e6c0e9f6ab31bad3dd88aa642cbc735 /gcc/omp-low.c | |
parent | 47b5a0ec7316e1c0683d5a9592d2c405c48eb338 (diff) | |
download | gcc-8d9c1aec9dbce27caf524d863e461b6471d2c1d6.zip gcc-8d9c1aec9dbce27caf524d863e461b6471d2c1d6.tar.gz gcc-8d9c1aec9dbce27caf524d863e461b6471d2c1d6.tar.bz2 |
re PR c++/25874 ([gomp] ICE in calc_dfs_tree())
PR 25874
* omp-low.c (execute_expand_omp): Move CFG cleanup code ...
(expand_omp): ... here.
(expand_omp_parallel): Only remove barriers for combined
parallel+workshare constructs.
* gcc.dg/gomp/pr25874.c: New test.
From-SVN: r110393
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r-- | gcc/omp-low.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 93ceb8e..38d4224 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -2279,13 +2279,16 @@ expand_omp_parallel (struct omp_region *region) entry_bb = bb_for_stmt (region->entry); exit_bb = bb_for_stmt (region->exit); - /* Barriers at the end of the function are not necessary and can be - removed. Since the caller will have a barrier of its own, this - one is superfluous. */ - remove_exit_barrier (region); - if (is_combined_parallel (region)) - ws_args = region->ws_args; + { + ws_args = region->ws_args; + + /* For combined parallel+workshare calls, barriers at the end of + the function are not necessary and can be removed. Since the + caller will have a barrier of its own, the workshare barrier is + superfluous. */ + remove_exit_barrier (region); + } else ws_args = NULL_TREE; @@ -3244,6 +3247,13 @@ expand_omp (struct omp_region *region) gcc_unreachable (); } + /* Expansion adds and removes basic block, edges, creates + and exposes unreachable regions that need to be cleaned up + before proceeding. */ + free_dominance_info (CDI_DOMINATORS); + free_dominance_info (CDI_POST_DOMINATORS); + cleanup_tree_cfg (); + region = region->next; } } @@ -3339,12 +3349,7 @@ execute_expand_omp (void) splay_tree_delete (omp_regions); root_omp_region = NULL; omp_regions = NULL; - free_dominance_info (CDI_DOMINATORS); - free_dominance_info (CDI_POST_DOMINATORS); } - - /* Expansion adds basic blocks that may be merged. */ - cleanup_tree_cfg (); } static bool |