We use an absolute address for stack objects and
it would be necessary to have a constant 0 for soffset field.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Should make corresponding globalisel change. I think there are some missing assert changes too that were checking the soffset
Comment Actions
At global-isel, it has already been taken care of.
The asserts - the cases where it is expecting a register is specifically for sp relative accesses and won't cause a problem after this patch.
Comment Actions
It's not:
[=](MachineInstrBuilder &MIB) { // soffset // If we don't know this private access is a local stack object, it // needs to be relative to the entry point's scratch wave offset. // TODO: Should split large offsets that don't fit like above. // TODO: Don't use scratch wave offset just because the offset // didn't fit. if (!Info->isEntryFunction() && FI.hasValue()) MIB.addReg(Info->getStackPtrOffsetReg()); else MIB.addImm(0); },
llvm/test/CodeGen/AMDGPU/stack-pointer-offset-relative-frameindex.ll | ||
---|---|---|
43–46 ↗ | (On Diff #297559) | This is worse. Why did this break the local stack offset optimization? |
Comment Actions
This should also remove my recent change to SIRegisterInfo::resolveFrameIndex and switch it to an assert
Comment Actions
Used the FI directly in MI if available during ISel. Fixed an unhandled case during eliminateFrameIndex.
Also fixed the assertions to make sure the soffset field is relevant.