diff options
author | Diego Novillo <dnovillo@redhat.com> | 2004-10-18 18:01:10 +0000 |
---|---|---|
committer | Diego Novillo <dnovillo@gcc.gnu.org> | 2004-10-18 14:01:10 -0400 |
commit | 1a1804c27017289c540fd8b193209a8598af858a (patch) | |
tree | 65fa2dda5884adcb69fca3aa5ca69487f2799ab4 /gcc/tree-ssa.c | |
parent | bca9e17b5aade3e19ae49ff9c211510674b46a02 (diff) | |
download | gcc-1a1804c27017289c540fd8b193209a8598af858a.zip gcc-1a1804c27017289c540fd8b193209a8598af858a.tar.gz gcc-1a1804c27017289c540fd8b193209a8598af858a.tar.bz2 |
tree-cfg.c (bsi_for_stmt): Rename from stmt_for_bsi.
* tree-cfg.c (bsi_for_stmt): Rename from stmt_for_bsi.
Update all callers.
* tree-ssa.c (replace_immediate_uses): Call bsi_for_stmt.
Don't call fold_stmt more than once, use bsi_replace.
From-SVN: r89234
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r-- | gcc/tree-ssa.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 4362e01..7f73bcf 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -1105,20 +1105,9 @@ replace_immediate_uses (tree var, tree repl) fold_stmt (&tmp); if (tmp != stmt) { - basic_block bb = bb_for_stmt (stmt); - block_stmt_iterator si; - - /* Start iterating at the start of the basic block - holding STMT until we reach it. This is slow, but - it's the only way to get a statement pointer - reliably. */ - for (si = bsi_start (bb); !bsi_end_p (si); bsi_next (&si)) - if (bsi_stmt (si) == stmt) - { - fold_stmt (bsi_stmt_ptr (si)); - stmt = bsi_stmt (si); - break; - } + block_stmt_iterator si = bsi_for_stmt (stmt); + bsi_replace (&si, tmp, true); + stmt = bsi_stmt (si); } } |