[PATCH] D45189: [MachineOutliner][AArch64] Keep track of functions that use a red zone in AArch64MachineFunctionInfo and use that instead of checking for noredzone in the MachineOutliner

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 2 15:38:05 PDT 2018


paquette created this revision.
paquette added reviewers: t.p.northover, gberry, thegameg.
Herald added subscribers: kristof.beyls, javed.absar, rengolin.

This patch adds the a `usesRedZone()` function to AArch64MachineFunction info, similar to the function in X86MachineFunctionInfo.

Right now, to use the MachineOutliner, you have to pass `-mno-red-zone` to ensure that we never outline anything from a function which uses a red zone. This is kind of clunky, especially considering you have to pass `-aarch64-redzone` to use a red zone in the first place in AArch64.

This patch removes the `-mno-red-zone` requirement and teaches the outliner about which functions actually use a red zone. This would also allow for outlining from functions without red zones in the case where `-aarch64-redzone` is passed.


https://reviews.llvm.org/D45189

Files:
  lib/Target/AArch64/AArch64FrameLowering.cpp
  lib/Target/AArch64/AArch64InstrInfo.cpp
  lib/Target/AArch64/AArch64MachineFunctionInfo.h
  test/CodeGen/AArch64/machine-outliner-noredzone.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45189.140696.patch
Type: text/x-patch
Size: 3914 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180402/ed2c27ff/attachment.bin>


More information about the llvm-commits mailing list