[PATCH] D63746: MachineFrameInfo: Make StackSize Optional.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 24 17:30:13 PDT 2019


arsenm created this revision.
arsenm added reviewers: qcolombet, MatzeB.
Herald added subscribers: jsji, kbarton, aheejin, jgravelle-google, sbc100, javed.absar, nhaehnle, wdng, jvesely, nemanjai, dschuff.

Currently it's easy to make mistakes by checking getStackSize() == 0
when this function is called before frame finalization. Make users
have to explicitly acknowledge this problem.

      

Another option would be to default to -1, so before the frame size is
computed things will conservatively assume there is stack usage.

      

Just omits it from the MIR form of MFI if missing, although maybe an
explicit unknown marker might be helpful. To fix crashing in some MIR
testcases, it would help to have StackFrameFinalized property.


https://reviews.llvm.org/D63746

Files:
  include/llvm/CodeGen/MIRYamlMapping.h
  include/llvm/CodeGen/MachineFrameInfo.h
  lib/CodeGen/MIRParser/MIRParser.cpp
  lib/CodeGen/MIRPrinter.cpp
  lib/CodeGen/RegisterScavenging.cpp
  lib/Target/AMDGPU/SIFrameLowering.cpp
  lib/Target/Hexagon/HexagonFrameLowering.cpp
  lib/Target/PowerPC/PPCFrameLowering.cpp
  lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp
  test/CodeGen/ARM/scavenging.mir
  test/CodeGen/MIR/Generic/frame-info.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63746.206338.patch
Type: text/x-patch
Size: 11359 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190625/d9a7c9ab/attachment.bin>


More information about the llvm-commits mailing list