[patch][df] RFC: Separate DF_REF flags for REG_EQUAL and REG_EQUIV notes
Kenneth Zadeck
zadeck@naturalbridge.com
Tue Dec 4 19:22:00 GMT 2007
Steven Bosscher wrote:
> Hi,
>
> My new cprop pass bombed on the first bootstrap I tried when it
> replaced a reference in a REG_EQUIV note. This happened because I
> have replaced gcse.c:find_used_regs() with a walk-and-sort of the
> DF_INSN_USES and DF_INSN_EQ_USES. Fine, as long as you don't replace
> anything in a REG_EQUIV note.
>
> Unfortunately, you can't tell from a DF_REF in the DF_INSN_EQ_USES
> whether it was in a REG_EQUAL or a REG_EQUIV note.
>
> It turns out fwprop also has trouble with this. It will prefer a use
> in a REG_EQUIV note over the SET_SRC of a single_set insn. I can't
> think of a test case to make this fail, but it seems to me we never
> want to propagate into a REG_EQUIV note.
>
> The attached patch therefore splits DF_REF_IN_NOTE into separate flags
> for the REG_EQUAL and REG_EQUIV case.
>
> Does this look reasonable (for GCC 4.4 after testing etc.)?
>
> Gr.
> Steven
>
the df changes are fine. i cannot approve the fwprop changes.
kenny
More information about the Gcc-patches
mailing list