[PATCH] D123932: MachineModuleInfo: Move HasSplitStack handling to AsmPrinter

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 18 14:58:20 PDT 2022


rnk added a comment.

In D123932#3457579 <https://reviews.llvm.org/D123932#3457579>, @arsenm wrote:

> I tried this and it doesn't quite work. Maintaining the current behavior requires 2 fields; that split-stacks requested and whether or not it was actually emitted. Do you think it would be better to just move the StackSize == 0 && !MFI.hasTailCall() check into a helper in MFI, track a second field in MFI, or just keep having the AsmPrinter look at the attribute?

I think you're right, that's the way to go. This logic is shared between targets anyway, and it gives us a place to park the long comments about the desired behavior, which is that all non-leaf functions need split stack prologues, even if they use no stack space.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123932/new/

https://reviews.llvm.org/D123932



More information about the llvm-commits mailing list