Commit 515f36eb by Richard Guenther Committed by Richard Biener

re PR tree-optimization/33302 (dead-store not eliminated)

2007-09-06  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/33302
	* tree-ssa-dse.c (tree_ssa_dse): Connect infinite loops
	to the exit block before doing the post-dominator walk.
	* domwalk.c (walk_dominator_tree): The exit block is
	interesting even if it is not reachable.

	* gcc.dg/tree-ssa/ssa-dse-11.c: New testcase.

From-SVN: r128180
parent 47de45c6
2007-09-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/33302
* domwalk.c (walk_dominator_tree): The exit block is
interesting even if it is not reachable.
2007-09-06 Richard Sandiford <richard@codesourcery.com> 2007-09-06 Richard Sandiford <richard@codesourcery.com>
PR middle-end/33306 PR middle-end/33306
......
...@@ -151,7 +151,9 @@ walk_dominator_tree (struct dom_walk_data *walk_data, basic_block bb) ...@@ -151,7 +151,9 @@ walk_dominator_tree (struct dom_walk_data *walk_data, basic_block bb)
while (true) while (true)
{ {
/* Don't worry about unreachable blocks. */ /* Don't worry about unreachable blocks. */
if (EDGE_COUNT (bb->preds) > 0 || bb == ENTRY_BLOCK_PTR) if (EDGE_COUNT (bb->preds) > 0
|| bb == ENTRY_BLOCK_PTR
|| bb == EXIT_BLOCK_PTR)
{ {
/* If block BB is not interesting to the caller, then none of the /* If block BB is not interesting to the caller, then none of the
callbacks that walk the statements in BB are going to be callbacks that walk the statements in BB are going to be
......
2007-09-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/33302
* gcc.dg/tree-ssa/ssa-dse-11.c: New testcase.
2007-09-06 Jerry DeLisle <jvdelisle@gcc.gnu.org> 2007-09-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/33225 PR libfortran/33225
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-dse1-details" } */
extern void abort(void);
void foo(int *p)
{
while (1)
{
*p = 0;
*p = 0;
}
}
void bar(int *p)
{
*p = 0;
*p = 0;
abort ();
}
/* { dg-final { scan-tree-dump-times "Deleted dead store" 2 "dse1" } } */
/* { dg-final { cleanup-tree-dump "dse1" } } */
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