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

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 19 17:21:00 PST 2018


MatzeB edited reviewers, added: aemerson, whitequark; removed: MatzeB.
MatzeB added a comment.

In https://reviews.llvm.org/D43107#1011163, @nruslan wrote:

> @MatzeB : mstack-probe-size=0 is already used for a different purpose. It basically, if I remember correctly, always forces calls to chkstk regardless of the actual stack usage. Normally that would only happen after 4K. Regarding your second question -- do we really need to have these flags to be mutually-exclusive? They are related but serve a different purpose. stack-probe-size merely changes the default probe size from 4K to the specified value.  mstack-arg-probe/mno-stack-arg-probe enables/disables stack probes. If we disable stack probes, their size no longer matters,  but we do not necessarily have to prohibit stack-probe-size. So, in fact, I can imagine somebody may even define system-wide alias if they want to override 4K (for whatever reason). Then some Makefile (which is unaware of this alias) may, for example, disable stack probes completely (like in UEFI code case), and we do not necessarily want to prohibit this combination.




- I don't really know what the current stack-probe-size=0 would be useful for; but then again I'm not actively working on it either.
- There's a difference in what flags clang allows and what IR allows. While I see your point for what clang should allow, for llvm IR I think it would be more desirable to be have things stricter and generally disallow non-useful/ambiguous combinations.

Anyway I don't care deeply about this and don't do that much middle-end work anyway so go with what you think is best.


https://reviews.llvm.org/D43107





More information about the llvm-commits mailing list