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: PING: PR/17236, improve long long multiply on x86 (middle-end)



This change is going to give a big bump to registers whose preferred
class has only one or two registers, such as the HI/LO registers on
MIPS.

I don't really think so. For MIPS, it is going to favor registers whose preferred class is MD*_REG, over those whose preferred class is LO_AND_GR_REGS.


But on MIPS in particular, I doubt regclass will give a preferred register class of MD*_REG to anything, because moves from and to LO/HI use starred constraints to avoid this case. My regalloc-fu is low, but IIUC this means that only reload can create moves from/to the multiplication result registers.

That said, I wonder if it might actually make sense (no, I didn't think it that way, but I ask) if we do this change only in local-alloc.c?

What happens if you only use size of register class as a tie-breaker
for quantities which are otherwise equal?

I'm worried that in general it won't work, because priorities are rarely exactly equal (mostly because of the live range). I'm almost sure this happens for the PR testcase, but I don't have data at hand.


Paolo


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