[SVE] Don't use LocalStackAllocation for SVE objects
authorDavid Sherwood <david.sherwood@arm.com>
Tue, 14 Jul 2020 15:20:00 +0000 (16:20 +0100)
committerDavid Sherwood <david.sherwood@arm.com>
Mon, 27 Jul 2020 07:22:01 +0000 (08:22 +0100)
commit14bc85e0ebb6c00c1672158ab6a692bfbb11e1cc
tree264250511934fd45b3831f8f4a78ab363fbd2ec1
parentf2ab2134c7c4949eea3f6ddd35bcea236fe12592
[SVE] Don't use LocalStackAllocation for SVE objects

I have introduced a new TargetFrameLowering query function:

  isStackIdSafeForLocalArea

that queries whether or not it is safe for objects of a given stack
id to be bundled into the local area. The default behaviour is to
always bundle regardless of the stack id, however for AArch64 this is
overriden so that it's only safe for fixed-size stack objects.
There is future work here to extend this algorithm for multiple local
areas so that SVE stack objects can be bundled together and accessed
from their own virtual base-pointer.

Differential Revision: https://reviews.llvm.org/D83859
llvm/include/llvm/CodeGen/TargetFrameLowering.h
llvm/lib/CodeGen/LocalStackSlotAllocation.cpp
llvm/lib/Target/AArch64/AArch64FrameLowering.h
llvm/test/CodeGen/AArch64/sve-localstackalloc.mir [new file with mode: 0644]