[PATCH] D119996: [safestack] Support safestack in stack size diagnostics
Paul Kirth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 4 19:07:15 PST 2022
paulkirth added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1211
const MachineFrameInfo &FrameInfo = MF.getFrameInfo();
- uint64_t StackSize = FrameInfo.getStackSize();
+ uint64_t StackSize =
+ FrameInfo.getStackSize() + FrameInfo.getUnsafeStackSize();
----------------
mcgrathr wrote:
> Should we also update emitStackSizeSection to match?
> I'm not sure whether that's meant to be used for diagnostic-like cases or for more concrete backend uses where the distinction between the two stacks still matters.
>
I am not exactly sure, but https://reviews.llvm.org/D39788, which I believe adds the feature seems like it is only used for diagnostic information according to the RFC they mention: http://lists.llvm.org/pipermail/llvm-dev/2017-August/117028.html.
Changing the behavior to be aware of the safe-stack, however, does seem consistent with the original goal of the feature, so I'm happy to update the patch to reflect that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119996/new/
https://reviews.llvm.org/D119996
More information about the llvm-commits
mailing list