From: Richard Sandiford Date: Mon, 8 Oct 2018 18:58:59 +0000 (+0000) Subject: Use FOR_EACH_IMM_USE_FAST in gimple-ssa-backprop.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=91a3cbb4d20c3486ee38233f5864c3625692ea80;p=gcc.git 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 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b351e9c5d3d..8e06be7620b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-10-08 Richard Sandiford + + PR middle-end/63155 + * gimple-ssa-backprop.c (backprop::intersect_uses): Use + FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT. + 2018-10-08 H.J. Lu PR target/87517 diff --git a/gcc/gimple-ssa-backprop.c b/gcc/gimple-ssa-backprop.c index d554826216f..16b8943d58e 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 (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;