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] |
Hi, The current format of a REG rtx is "i00", with: - op1 -> regno (REGNO) - op2 -> original regno before regalloc (ORIGINAL_REGNO) - op3 -> reg_attrs (REG_ATTRS) In the only major ORIGINAL_REGNO user, regrename.c, we seem to be only interested in testing if ORIGINAL_REGNO (reg) == REGNO (reg), in which case it must have been a hard reg from an asm statement. This could just be a flag on a REG instead. Other reasons for ORIGINAL_REGNO are purely cosmetic, for rtl dumps and verbose asm, but IMHO one can just read the RTL dumps to see what happened. Basically, there is no real necessity for ORIGINAL_REGNO as far as I can tell. So ORIGINAL_REGNO can and should go away, I think. This would make the format of a reg "i0", ie. it saves a few bytes for a REG rtx. Also, since a MEM rtx is also of format "i0", killing ORIGINAL_REGNO makes MEMs and REGs of the same size again, which puts them in the same GC pages. I expect this to give us a little speedup, but I'll have to test this patch a little better to make sure... As a side effect, gen_raw_REG can go away because the only thing it does extra compared to gen_rtx_raw_REG is setting ORIGINAL_REGNO. I've only lightly tested this patch: bootstrapped and tested C only on i686. If the patch looks OK and everyone agrees that we don't need to preserve ORIGINAL_REGNO just for pretty printing, I'll test it more properly and resubmit it for inclusion. Gr. Steven
Attachment:
kill_ORIGINAL_REGNO.diff
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |