[PATCH] D72366: [AArch64] Stack frame reordering.
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 7 15:06:12 PST 2020
eugenis created this revision.
eugenis added reviewers: ostannard, pcc.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: LLVM.
Implement stack frame reordering in the AArch64 backend.
Unlike the X86 implementation, AArch64 does not seem to benefit from
"access density" based frame reordering, mainly because it has a much
smaller variety of addressing modes, and the fact that all instructions
are 4 bytes so each frame object is either in range of an instruction
(and then the access is "free") or not (and that has a code size cost
of 4 bytes).
This change improves Memory Tagging codegen by
- Placing an object that has been chosen as the base tagged pointer of
the function at SP + 0. This saves one instruction to setup the pointer
(IRG does not have an offset immediate), and more because that object
can now be referenced without materializing its tagged address in a
scratch register.
- Placing objects that go out of scope simultaneously together. This
exposes opportunities for instruction merging in tryMergeAdjacentSTG.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D72366
Files:
llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
llvm/lib/Target/AArch64/AArch64FrameLowering.h
llvm/test/CodeGen/AArch64/settag-merge-order.ll
llvm/test/CodeGen/AArch64/settag-merge.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72366.236697.patch
Type: text/x-patch
Size: 9697 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200107/1eb237f8/attachment.bin>
More information about the llvm-commits
mailing list