[llvm] [AMDGPU] Use immediates for stack accesses in chain funcs (PR #71913)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 10 05:09:29 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()) {
----------------
jayfoad wrote:
Is it worth inventing `isEntryOrChainFunction`, or some other name that captures the commonality?
https://github.com/llvm/llvm-project/pull/71913
More information about the llvm-commits
mailing list