This is an archive of the discontinued LLVM Phabricator instance.

MachineFrameInfo: Make StackSize Optional.
AcceptedPublic

Authored by arsenm on Jun 24 2019, 5:26 PM.

Details

Reviewers
qcolombet
MatzeB
Summary

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.

Diff Detail