This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch][cprop.c] Simplify find_used_regs, iterate cprop_insn


Hi,

This patch has one significant change: cprop_insn would not iterate
after a successful copy propagation, assuming the uses found with
find_used_regs remain the same. This is not true in two cases:

* find_used_regs found multiple uses of the same register, but that
register was replaced by try_replace_reg.

* find_used_regs found regs that have been folded after substitution
in try_replace_reg (which ultimately tries simplify_replace_rtx if all
else fails)

After this patch, cprop_insn starts over after one successful copy
propagation replacement.


The rest of the patch just cleans up a single-member struct reg_use {
rtx reg }. An array of rtx is simpler, although it probably makes no
difference for the generated code for cprop.c.

Bootstrapped & tested on x86_64-unknown-linux-gnu. OK?

Ciao!
Steven

Attachment: cprop_cleanup_6.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]