[PATCH] D72366: [AArch64] Stack frame reordering.
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 1 17:17:53 PDT 2020
eugenis marked 3 inline comments as done and an inline comment as not done.
eugenis added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:3193
+ const MachineFunction &MF, SmallVectorImpl<int> &ObjectsToAllocate) const {
+ if (!OrderFrameObjects || ObjectsToAllocate.empty())
+ return;
----------------
eugenis wrote:
> efriedma wrote:
> > Can we skip running this code when stack tagging is disabled? It doesn't do anything in that case, I think, but it would avoid running a bunch of unnecessary code, and make the intent more clear.
> Sure, we can look for the sanitize_memtag attribute. Stack tagging instructions can be added some other way of course (ex. with intrinsic calls in the C source).
> We could check if MTE is in the subtarget's feature bits, but that would not help much.
>
>
I'm not sure how to do this. As settag-merge-order.ll test shows, it's pretty easy to generate code that benefits from this transformation w/o a sanitize_memtag attribute.
I could fold this check into some other place where we scan all instructions in a function, like the StackTaggingPreRA pass, and store in AArch64FunctionInfo, but that looks like a premature optimization to me.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72366/new/
https://reviews.llvm.org/D72366
More information about the llvm-commits
mailing list