[PATCH] D18619: [AArch64] Combine callee-save and local stack SP adjustment instructions.

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Mon May 2 14:28:38 PDT 2016


On 2 May 2016 at 14:02, Geoff Berry <gberry at codeaurora.org> wrote:
> I recall thinking about this issue and convincing myself that it wasn't a problem, but I clearly don't know all the dark corners of this code.  Do you think it is reasonable to try to enumerate the cases where this estimation might go wrong (even conservatively) to avoid this problem?

Possibly, though it would always worry me; I don't really understand
what's causing the mismatch either. With enough assertions it might be
feasible.

I think what I'd do though is move the logic into emitPrologue. I'd
make spillCalleeSavedRegisters always emit the normal FrameIndex
variants and then fixup/hack the first one if necessary when you know
enough to make a final decision. If you put the hacking code into its
own function, it hopefully won't make the main logic too much more
opaque. Nasty, but that sums up the whole file really.

Cheers.

Tim.


More information about the llvm-commits mailing list