[PATCH] D70800: Fix AArch64 AAPCS frame record chain

Owen Anderson via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 1 11:12:19 PDT 2020



> On Sep 1, 2020, at 10:35 AM, Paul Walker <Paul.Walker at arm.com> wrote:
> 
> Sure, but that means there need to be a way to detect when FP is displaced (hence my original question).  If such data is available (and it needs to be for SVE code generation to function correctly) then I don't see why the assert cannot use it to assert Bytes is correctly aligned and displaced.

It is not available *in emitFrameOffset*, which is called from a number of places.  You would need to have every caller pass in the current frame pointer displacement, since it can be called with partially setup frames.  It would also need to have sane behavior in scenarios where the frame pointer is not in use.  All of this would require passing values around that would only be used in an assertion.

SVE frame layout is handled in callers of emitFrameOffset, which are generally keeping track of frame pointer displacement themselves.

If you want to refactor emitFrameOffset to take an extra argument for frame pointer displacement and pass it in everywhere, I won’t object, but I believe it is well outside the scope of fixing an actual bug in AAPCS-compliant code generation.

—Owen


More information about the llvm-commits mailing list