[PATCH] Fast-path for stack probes on smaller frames

Philip Reames listmail at philipreames.com
Fri Aug 29 11:47:08 PDT 2014


On 08/21/2014 04:59 PM, Philip Reames wrote:
> Hi echristo, t.p.northover, chapuni, Kai, asl,
> Fast-path for stack probes on smaller frames.  If the amount of stack space needed is less than 5 pages, inline the stack probing into the function prolog and avoid calling chkstk.
> Most of this code came from a patch by john.kare.alsaker at gmail.com on the 'Add a "probe-stack" attribute' review thread.  I have tweaked the code slightly to add a test case (independent of the probe-stack attribute), and rebase it against TOT.  I've been a reviewer on this thread, but on going to actually submit it, I realized I really don't have the expertise in this area to feel comfortable submitting.   I'm comfortable with what it's doing in theory, but don't have the Windows experience to evaluate the practical impact.
> If any of the reviewers who are actually familiar with Windows can give an LGTM, I can do the actual commit on John's behalf (since he doesn't have commit access.)  Sorry for the slightly irregular process.
> http://reviews.llvm.org/D5018
> Files:
>    lib/Target/X86/X86FrameLowering.cpp
>    test/CodeGen/X86/mingw-alloca.ll
>    test/CodeGen/X86/pr17631.ll
>    test/CodeGen/X86/win64_alloca_dynalloca.ll
>    test/CodeGen/X86/win64_eh.ll
>    test/CodeGen/X86/win_chkstk.ll

More information about the llvm-commits mailing list