[PATCH] D42534: [mips] Compute MaxCallFrame size early on

Stefan Maksimovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 07:47:08 PST 2018


smaksimovic added a comment.

Looking again at the tests reported in the upstream issue I found that with these changes DebugInfo/Mips/dsr-fixed-objects.ll fails still.
The reason being is that the frame register is queried with getFrameRegister() ( which ultimately calls getMaxCallFrameSize() ) inside SelectionDAGISel::runOnMachineFunction() prior to calling finalizeLowering() which calculates maxCallFrameSize.

We could call the function which computes the maxCallFrameSize in MipsDAGToDAGISel::runOnMachineFunction() prior to running selectionDAG which would compute maxCallFrameSize, albeit erroneously.
Computing maxCallFrameSize afterwards finalizeLowering() does get us the correct value, but seems like a hacky way to get around the problem.


https://reviews.llvm.org/D42534





More information about the llvm-commits mailing list