diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2018-10-08 18:58:59 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2018-10-08 18:58:59 +0000 |
commit | 91a3cbb4d20c3486ee38233f5864c3625692ea80 (patch) | |
tree | 49307b01a9f05fd1b9a1739ed38cf07e9004c72f /gcc/gimple-ssa-backprop.c | |
parent | be86efa7cc3ff3f4cd99da34a7fb73b5043cb4d9 (diff) | |
download | gcc-91a3cbb4d20c3486ee38233f5864c3625692ea80.zip gcc-91a3cbb4d20c3486ee38233f5864c3625692ea80.tar.gz gcc-91a3cbb4d20c3486ee38233f5864c3625692ea80.tar.bz2 |
Use FOR_EACH_IMM_USE_FAST in gimple-ssa-backprop.c
As pointed out by Richard in PR63155. It speeds up the testcase a few %.
2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
gcc/
PR middle-end/63155
* gimple-ssa-backprop.c (backprop::intersect_uses): Use
FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
From-SVN: r264941
Diffstat (limited to 'gcc/gimple-ssa-backprop.c')
-rw-r--r-- | gcc/gimple-ssa-backprop.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/gimple-ssa-backprop.c b/gcc/gimple-ssa-backprop.c index d554826..16b8943 100644 --- a/gcc/gimple-ssa-backprop.c +++ b/gcc/gimple-ssa-backprop.c @@ -496,10 +496,11 @@ bool backprop::intersect_uses (tree var, usage_info *info) { imm_use_iterator iter; - gimple *stmt; + use_operand_p use_p; *info = usage_info::intersection_identity (); - FOR_EACH_IMM_USE_STMT (stmt, iter, var) + FOR_EACH_IMM_USE_FAST (use_p, iter, var) { + gimple *stmt = USE_STMT (use_p); if (is_gimple_debug (stmt)) continue; gphi *phi = dyn_cast <gphi *> (stmt); @@ -523,10 +524,7 @@ backprop::intersect_uses (tree var, usage_info *info) process_use (stmt, var, &subinfo); *info &= subinfo; if (!info->is_useful ()) - { - BREAK_FROM_IMM_USE_STMT (iter); - return false; - } + return false; } } return true; |