[PATCH] D43107: Support for the mno-stack-arg-probe flag

Ruslan Nikolaev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 21:46:17 PST 2018


nruslan added inline comments.


================
Comment at: docs/LangRef.rst:1564
     of the callee.
+``"no-stack-arg-probe"``
+    This attribute disables ABI-required stack probes, if any.
----------------
hans wrote:
> Is the "arg" part of the name significant? It seems to me this applies to stack probing in general, and that's not just for arguments?
It is just to be consistent and compatible with MinGW


================
Comment at: lib/Target/X86/X86WinAllocaExpander.cpp:243
     break;
   case Probe:
+    if (!NoStackArgProbe) {
----------------
hans wrote:
> It seems odd that we end up in this case when we're not actually going to probe. Could the code be changed so that we end up in the Sub case instead, since that seems to do what we want here?
I am not sure what would be better here without major code changes. I tried initially to put it under Sub, but the problem is that it assumes specific fixed value which is -1 if unknown, so offsets will not be calculated correctly. So, I figured, it may be better to do directly under Probe. BTW -- It is the only place Probe is used, so possibly it can be renamed to something else?


https://reviews.llvm.org/D43107





More information about the llvm-commits mailing list