On 08/12/2014 09:35 PM, Jakub Jelinek wrote:
As detailed in the PR, find_inc ignored any possible clobbers on
inc_insn (typically %cc/flags/etc. register) and thus we could ignore
all register dependencies between mem_insn and inc_insn even when
we could only safely ignore the mem_reg0 register dependency.

I've been trying to remember how I intended to prevent this, and there is indeed a mechanism: DEP_MULTIPLE, which ought to be set for any dependency between two insns that is found for more than one reason. find_inc does not try to break such dependencies, which should make it examine only cases where the only reason for a dependency is between the incremented register and the memory address. I'm pretty sure this worked at some point.

So all the new added code may or may not be safe, but it's not exactly pretty and I think the real bug is likely elsewhere.


Bernd

Reply via email to