diff options
author | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-18 18:01:10 +0000 |
---|---|---|
committer | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-18 18:01:10 +0000 |
commit | ed5cb77f09fb99056644ce86c6305f80df0c18ce (patch) | |
tree | 65fa2dda5884adcb69fca3aa5ca69487f2799ab4 /gcc/tree-ssa.c | |
parent | 81fdab0ff0f31bdd66cedb925c57f1994e02502c (diff) | |
download | gcc-ed5cb77f09fb99056644ce86c6305f80df0c18ce.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89234 138bc75d-0d04-0410-961f-82ee72b054a4
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 4362e01aff8..7f73bcf6e73 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); } } |