When I wrote this code I forgot about FOR_EACH_IMM_USE_FAST. Since this code does not change
any of the uses inside of the loop using FOR_EACH_IMM_USE_FAST will be slightly faster.
Bootstrapped and tested on x86_64-linux-gnu.
gcc/ChangeLog:
* tree-ssa-dce.cc (simple_dce_from_worklist): Use FOR_EACH_IMM_USE_FAST instead of
FOR_EACH_IMM_USE_STMT.
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
if (gimple_code (def_stmt) != GIMPLE_PHI)
continue;
- gimple *use_stmt;
imm_use_iterator use_iter;
+ use_operand_p use_p;
bool canremove = true;
- FOR_EACH_IMM_USE_STMT (use_stmt, use_iter, def)
+ FOR_EACH_IMM_USE_FAST (use_p, use_iter, def)
{
+ gimple *use_stmt = USE_STMT (use_p);
/* Ignore debug statements. */
if (is_gimple_debug (use_stmt))
continue;