aboutsummaryrefslogtreecommitdiff
path: root/gcc/graphite-scop-detection.c
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@adacore.com>2021-01-11 23:37:59 -0300
committerAlexandre Oliva <oliva@gnu.org>2021-01-11 23:37:59 -0300
commit640296c367f97a1b9974bfb60bb02c934d71baf4 (patch)
treedf3eae8c2ec9b2891ef1e53258a47ccd24182fd4 /gcc/graphite-scop-detection.c
parentab88f3607233376c3145c320e92e71943a495bb5 (diff)
downloadgcc-640296c367f97a1b9974bfb60bb02c934d71baf4.zip
gcc-640296c367f97a1b9974bfb60bb02c934d71baf4.tar.gz
gcc-640296c367f97a1b9974bfb60bb02c934d71baf4.tar.bz2
make FOR_EACH_IMM_USE_STMT safe for early exits
Use a dtor to automatically remove ITER from IMM_USE list in FOR_EACH_IMM_USE_STMT. for gcc/ChangeLog * ssa-iterators.h (end_imm_use_stmt_traverse): Forward declare. (auto_end_imm_use_stmt_traverse): New struct. (FOR_EACH_IMM_USE_STMT): Use it. (BREAK_FROM_IMM_USE_STMT, RETURN_FROM_IMM_USE_STMT): Remove, along with uses... * gimple-ssa-strength-reduction.c: ... here, ... * graphite-scop-detection.c: ... here, ... * ipa-modref.c, ipa-pure-const.c, ipa-sra.c: ... here, ... * tree-predcom.c, tree-ssa-ccp.c: ... here, ... * tree-ssa-dce.c, tree-ssa-dse.c: ... here, ... * tree-ssa-loop-ivopts.c, tree-ssa-math-opts.c: ... here, ... * tree-ssa-phiprop.c, tree-ssa.c: ... here, ... * tree-vect-slp.c: ... and here, ... * doc/tree-ssa.texi: ... and the example here.
Diffstat (limited to 'gcc/graphite-scop-detection.c')
-rw-r--r--gcc/graphite-scop-detection.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
index 4f7bbe5..3e729b1 100644
--- a/gcc/graphite-scop-detection.c
+++ b/gcc/graphite-scop-detection.c
@@ -1262,9 +1262,7 @@ build_cross_bb_scalars_def (scop_p scop, tree def, basic_block def_bb,
&& (def_bb != gimple_bb (use_stmt) && !is_gimple_debug (use_stmt)))
{
add_write (writes, def);
- /* This is required by the FOR_EACH_IMM_USE_STMT when we want to break
- before all the uses have been visited. */
- BREAK_FROM_IMM_USE_STMT (imm_iter);
+ break;
}
}