[llvm] [MachineFrameInfo] Refactoring with computeMaxcallFrameSize() (NFC) (PR #78001)

Jonas Paulsson via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 2 06:21:21 PST 2024


JonPsson1 wrote:

@arsenm I guess you are right that it makes most sense to compute the AdjustsStack flag for both calls and inlineasms in the same place. I think it should probably be done during isel, since it is not affected by anything else computed later on. However, I started with that thinking that all that would be needed would be to do it once in getCALLSEQ_START(). That turned out to be far from true: There is GlobalISel, FastISel, X86 emits it during EmitCustomInserter, ... Global ISel even emits it by first creating it and then only after creating other instructions adding the final immediate values to it. 

I am not sure if it would actually be better to do it in isel, as there are so many different places this would have to be remembered. It is simplifying during isel to not have to set AdjustsStack, but of course it could be done.

I kept that part out of the patch for now, so now this only avoids the code duplication of computeMaxCallFrameSize().


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


More information about the llvm-commits mailing list