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]

Re: Repost: RFA [4.1]: improvement to if-conversion and cross-jumping (PR20070)


Bernd Schmidt wrote:

Nevermind the fact that this has a duplicate call of validate_change. What is this code trying to do? I would have naively thought that if we have R5 and R0 live at the end, then previous uses of either register must match exactly.

Can you post an RTL example of what you're trying to accomplish with the code related to input_reg? What can be done with it that can't be done by examining the local_regs still live at the start of a block?

input_reg is for a register that is *not* local to the block, but remains unaltered. In principle, we could also match constants here, but I haven't had sufficient motivation (as in: appears to be relevant to performance according to the benchmarks I've looked at) so far. We should only encounter it as an rvalue.
When we are processing REG_NOTES, e..g REG_EQUAL, it is quite possible that we see a note later in the insn stream than the actual last use in insn patterns, i.e. scanning backwards
we'll see these notes first. In order to recognize them, we have to use information from a previous pass.
input_reg is expected to be only set once for each block matching, but it is thinkable that strange backtracking with equivalences will cause us to discard an input reg and use a different one.
This might not actually be possible in the current code, but it seems too fragile to rely on that.




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