aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-sra.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-07-03 19:52:36 -0700
committerRichard Henderson <rth@gcc.gnu.org>2004-07-03 19:52:36 -0700
commitbdecd3343c71b1edce5f7069f63979d26e1b9f5e (patch)
treebd19bf2cb69c4a29adc78e508ba6a33b8d236503 /gcc/tree-sra.c
parentca8afd0bf055d7b8d0f27bab76cfa62cb12d6a3a (diff)
downloadgcc-bdecd3343c71b1edce5f7069f63979d26e1b9f5e.zip
gcc-bdecd3343c71b1edce5f7069f63979d26e1b9f5e.tar.gz
gcc-bdecd3343c71b1edce5f7069f63979d26e1b9f5e.tar.bz2
re PR tree-optimization/16341 (BOOT_CFLAGS='-O2 -fno-inline' causes a comparision failure)
PR tree-optimization/16341 * tree-sra.c (sra_walk_function): Increment to next stmt before processing the current stmt. (sra_insert_after): Always use BSI_SAME_STMT. From-SVN: r84070
Diffstat (limited to 'gcc/tree-sra.c')
-rw-r--r--gcc/tree-sra.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 0f04fcb..f315ad9 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -828,13 +828,13 @@ static void
sra_walk_function (const struct sra_walk_fns *fns)
{
basic_block bb;
- block_stmt_iterator si;
+ block_stmt_iterator si, ni;
/* ??? Phase 4 could derive some benefit to walking the function in
dominator tree order. */
FOR_EACH_BB (bb)
- for (si = bsi_start (bb); !bsi_end_p (si); bsi_next (&si))
+ for (si = bsi_start (bb); !bsi_end_p (si); si = ni)
{
tree stmt, t;
stmt_ann_t ann;
@@ -842,6 +842,9 @@ sra_walk_function (const struct sra_walk_fns *fns)
stmt = bsi_stmt (si);
ann = stmt_ann (stmt);
+ ni = si;
+ bsi_next (&ni);
+
/* If the statement has no virtual operands, then it doesn't
make any structure references that we care about. */
if (NUM_V_MAY_DEFS (V_MAY_DEF_OPS (ann)) == 0
@@ -1616,7 +1619,7 @@ sra_insert_after (block_stmt_iterator *bsi, tree list)
if (stmt_ends_bb_p (stmt))
insert_edge_copies (list, bsi->bb);
else
- bsi_insert_after (bsi, list, BSI_CONTINUE_LINKING);
+ bsi_insert_after (bsi, list, BSI_SAME_STMT);
}
/* Similarly, but replace the statement at BSI. */