[PATCH] D130068: [RISCV][NFCI] Set TransientStackAlignment and rely on it rather than RVV-specific logic on RVV-less functions
Kito Cheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 1 08:56:27 PDT 2022
kito-cheng accepted this revision.
kito-cheng added a comment.
Leave some comment before but apparently I never click submit.
---
Traced related implementation in LLVM, the comment say it means the number of bytes to stack alignment all the time[1], so according the description this should always set to the stack alignment which psABI required no matter it's baremetal or not:
- Linux require this be true since the stack space of signal handler will based on the current stack, and signal could be happened in any time, so the stack must align to ABI stack alignment.
- Bare-metal might also use stack pointer directly in the interrupter handler just like signal handler, so that's same situation as signal handler, we need always make sure this align to ABI stack alignment.
So LGTM, but I think the FIXME could be removed since I think it's also true for non-baremetal - at least for Linux (I don't know too much about other OS like FreeBSD).
[1]
`llvm/include/llvm/CodeGen/TargetFrameLowering.h`
/// getTransientStackAlignment - This method returns the number of bytes to
/// which the stack pointer must be aligned at all times, even between
/// calls.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130068/new/
https://reviews.llvm.org/D130068
More information about the llvm-commits
mailing list