[llvm] [AMDGPU] Use immediates for stack accesses in chain funcs (PR #71913)
Nicolai Hähnle via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 13 12:11:07 PST 2023
================
@@ -1799,10 +1798,11 @@ static bool frameTriviallyRequiresSP(const MachineFrameInfo &MFI) {
bool SIFrameLowering::hasFP(const MachineFunction &MF) const {
const MachineFrameInfo &MFI = MF.getFrameInfo();
- // For entry functions we can use an immediate offset in most cases, so the
- // presence of calls doesn't imply we need a distinct frame pointer.
+ // For entry & chain functions we can use an immediate offset in most cases,
+ // so the presence of calls doesn't imply we need a distinct frame pointer.
if (MFI.hasCalls() &&
- !MF.getInfo<SIMachineFunctionInfo>()->isEntryFunction()) {
+ !MF.getInfo<SIMachineFunctionInfo>()->isEntryFunction() &&
+ !MF.getInfo<SIMachineFunctionInfo>()->isChainFunction()) {
----------------
nhaehnle wrote:
I'd say it's not worth it unless we find a good name for it. `isBottomOfStackFunction`? Not too fond of that, to be honest, but at least it captures the meaning.
https://github.com/llvm/llvm-project/pull/71913
More information about the llvm-commits
mailing list