[PATCH] D87956: [IR] add fn attr for no_stack_protector; prevent inlining on mismatch
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 22 13:54:47 PDT 2020
nickdesaulniers added inline comments.
================
Comment at: llvm/lib/IR/Attributes.cpp:1901-1902
+ // caller was explicitly annotated as nossp.
+ if (Caller.hasFnAttribute(Attribute::NoStackProtect))
+ return;
// If upgrading the SSP attribute, clear out the old SSP Attributes first.
----------------
void wrote:
> nickdesaulniers wrote:
> > This should be an anomalous situation due to the added verifier check. Should I make it an assert instead?
> If it should never happen, then please make it an assert.
Ah this assertion is not quite right; we still would like to permit `nossp` callee being inlined into `nossp` caller. Let me add a test case for that, then make the assertion more precise about a **mismatch** between caller and callee.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87956/new/
https://reviews.llvm.org/D87956
More information about the cfe-commits
mailing list