[llvm] [SystemZ] Eliminate call sequence instructions early. (PR #77812)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 01:35:35 PST 2024


jayfoad wrote:

> I agree it would solve the current issue fairly well to add a helper function in MachineBasicBlock that would do this. But on the other hand, I wonder if it's only x86 primarily that needs the CALLSEQ pseudos around to do SP adjustments around each call. If that's the case, maybe the default should actually be to compute the MaxCallFrameSize during instruction selection? One step in that direction then, would be to eliminate them during finalize-isel for SystemZ.

I don't know if this is relevant, but: the reason I introduced `MachineBasicBlock::CallFrameSize` was for ARM, which can create a call sequence with a non-zero frame size and then later split the block in the middle of the call sequence in `ARMTargetLowering::EmitStructByval`.

https://github.com/llvm/llvm-project/pull/77812


More information about the llvm-commits mailing list