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
This commit is contained in:
parent
47de45c6fc
commit
515f36ebd9
@ -1,3 +1,9 @@
|
||||
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>
|
||||
|
||||
PR middle-end/33306
|
||||
|
@ -151,7 +151,9 @@ walk_dominator_tree (struct dom_walk_data *walk_data, basic_block bb)
|
||||
while (true)
|
||||
{
|
||||
/* 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
|
||||
callbacks that walk the statements in BB are going to be
|
||||
|
@ -1,3 +1,8 @@
|
||||
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>
|
||||
|
||||
PR libfortran/33225
|
||||
|
21
gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-11.c
Normal file
21
gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-11.c
Normal file
@ -0,0 +1,21 @@
|
||||
/* { 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" } } */
|
Loading…
Reference in New Issue
Block a user