[PATCH] Fix -fcompare-debug differences caused by fwprop (PR debug/42728)

Paolo Bonzini bonzini@gnu.org
Tue Jan 19 09:14:00 GMT 2010


> The problem is that all_uses_available_at has different behavior in case of
> uninitialized vars, depending on whether def_insn and target_insn
> is adjacent.  If they are adjacent, the cheaper variant will return false
> (as def_insn not only defines, but also uses the reg target_insn uses), but
> the more expensive variant returns true (it sees that the pseudo has only
> one definition, so assumes it doesn't have to check it more).
>
> Attached are two possible ways to fix it, the first one adds the same check
> as the quicker variant does to the more expensive one, the second one
> changes the check what is considered adjacent to ignore debug insns in
> between.
>
> Both have been bootstrapped/regtested on x86_64-linux and i686-linux.
> Ok for trunk (which one)?

I prefer the first one, thanks for fixing it and for proposing the two
solutions.

Incidentally, I wonder what it buys us to do fwprop into debug insns...

Paolo



More information about the Gcc-patches mailing list