Commit 8d9c1aec by Diego Novillo Committed by Diego Novillo

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
parent 47b5a0ec
2006-01-29 Diego Novillo <dnovillo@redhat.com>
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.
2006-01-29 Eric Botcazou <ebotcazou@adacore.com>
Revert
......
......@@ -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
......
2006-01-29 Diego Novillo <dnovillo@redhat.com>
* gcc.dg/gomp/pr25874.c: New test.
2006-01-29 Dorit Nuzman <dorit@il.ibm.com>
PR tree-opt/25911
void foo();
inline void bar()
{
int i;
for ( i=0; i<1; ++i )
#pragma omp parallel
foo();
}
void baz()
{
#pragma omp parallel
bar();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment