[PATCH] D17679: [X86] Elide references to _chkstk for dynamic allocas
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 1 10:59:50 PST 2016
rnk added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:16365
@@ -16364,1 +16364,3 @@
+ bool Lower = SplitStack;
+ if (!Lower && Subtarget.isOSWindows() && !Subtarget.isTargetMachO()) {
----------------
Can we name this something like `CheckStack` instead? I interpreted `Lower` to mean "lower this to modifying ESP directly".
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:16377
@@ +16376,3 @@
+ .getAsInteger(0, StackProbeSize);
+ // Dynamic allocas force a frame pointer, take that into account.
+ unsigned AlignedAlloc = SizeC->getZExtValue() + RegInfo->getSlotSize();
----------------
hans wrote:
> Can we check whether the alloca is dynamic or not, or is that hard to figure out from here?
I don't think we need to think about the frame pointer at all for dynamic allocas. If we're concerned that there haven't been any accesses to top-of-stack since the prologue, we could instead emit an inline stack probe (`orl $0, (%esp)`) here.
http://reviews.llvm.org/D17679
More information about the llvm-commits
mailing list