[PATCH] D154281: [CodeGen] Store SP adjustment in MachineBasicBlock. NFCI.

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 1 05:55:59 PDT 2023


foad created this revision.
foad added reviewers: AMDGPU, t.p.northover, greened, rengolin, olista01, sdesmalen.
Herald added subscribers: StephenFan, hiraditya, kristof.beyls.
Herald added a project: All.
foad requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Record the SP adjustment on entry to each basic block. This is almost
always zero except on targets like ARM which can split a basic block in
the middle of a call sequence.

This simplifies PEI::replaceFrameIndices which previously had to visit
basic blocks in a specific order and had special handling for
unreachable blocks. More importantly it paves the way for an equally
simple implementation of a backwards version of replaceFrameIndices,
which is required to fully convert PrologEpilogInserter to backwards
register scavenging, which is preferred because it does not rely on
accurate kill flags.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D154281

Files:
  llvm/include/llvm/CodeGen/MachineBasicBlock.h
  llvm/lib/CodeGen/PrologEpilogInserter.cpp
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/lib/Target/ARM/ARMISelLowering.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154281.536527.patch
Type: text/x-patch
Size: 5030 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230701/ebc5e900/attachment.bin>


More information about the llvm-commits mailing list