[PATCH] D156113: [CodeGen] Store call frame size in MachineBasicBlock

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 24 05:38:53 PDT 2023


foad created this revision.
foad added reviewers: t.p.northover, greened, rengolin, olista01, sdesmalen, arsenm, sepavloff, luporl.
Herald added subscribers: StephenFan, pengfei, Jim, hiraditya, dylanmckay.
Herald added a project: All.
foad requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

Record the call frame size on entry to each basic block. This is usually
zero except when a basic block has been split 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/D156113

Files:
  llvm/include/llvm/CodeGen/MachineBasicBlock.h
  llvm/include/llvm/CodeGen/TargetInstrInfo.h
  llvm/lib/CodeGen/MIRParser/MILexer.cpp
  llvm/lib/CodeGen/MIRParser/MILexer.h
  llvm/lib/CodeGen/MIRParser/MIParser.cpp
  llvm/lib/CodeGen/MachineBasicBlock.cpp
  llvm/lib/CodeGen/MachineVerifier.cpp
  llvm/lib/CodeGen/PrologEpilogInserter.cpp
  llvm/lib/CodeGen/TargetInstrInfo.cpp
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/lib/Target/AVR/AVRISelLowering.cpp
  llvm/lib/Target/M68k/M68kISelLowering.cpp
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/ARM/2013-06-03-ByVal-2Kbytes.ll
  llvm/test/CodeGen/ARM/no-register-coalescing-in-returnsTwice.mir
  llvm/test/CodeGen/MIR/ARM/call-frame-size.mir
  llvm/tools/llvm-reduce/ReducerWorkItem.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156113.543488.patch
Type: text/x-patch
Size: 16230 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230724/ecd5806d/attachment.bin>


More information about the llvm-commits mailing list