[PATCH] D20263: X86: Avoid using _chkstk when lowering WIN_ALLOCA instructions

David Kreitzer via llvm-commits llvm-commits at lists.llvm.org
Tue May 17 13:02:01 PDT 2016


DavidKreitzer added a comment.

Thanks for the pointer to https://llvm.org/bugs/show_bug.cgi?id=26776, Reid.

> I doubt we can tolerate nested ADJCALLSTACK frames, though, and inalloca typically happens precisely when there is a nested call sequence.


I'm sure you are right. I'd still like to give it a try and see how badly things break.

> Obviously, stack frame reservation conflicts with nested call stack adjustments, but we should already be protected from that by the hasVarSizedObjects flag, which is set earlier in FunctionLoweringInfo.


We can still do stack frame reservation with nested call stack adjustments. It's just that the reserved call frame is only available to the top-level calls. Nested calls would have to do their own stack adjusts. I'm sure making that distinction would create some implementation challenges, and it isn't likely to be high impact, but it seems theoretically possible.


http://reviews.llvm.org/D20263





More information about the llvm-commits mailing list