[PATCH] D87956: [IR] add fn attr for no_stack_protector; prevent inlining on mismatch

Bill Wendling via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 21 15:44:23 PDT 2020


void accepted this revision.
void added a comment.
This revision is now accepted and ready to land.

Only a couple of nits, but I think this looks good.



================
Comment at: llvm/docs/BitCodeFormat.rst:1072
+* code 69: ``byref``
+* code 70: ``mustprogress``
+* code 71: ``nossp``
----------------
I'm tempted to say that these two adds should be a separate commit, but it's a nit and I'll leave it up to you.


================
Comment at: llvm/lib/Transforms/Utils/InlineFunction.cpp:1691
+        Caller->hasFnAttribute(Attribute::StackProtectReq))
+      return InlineResult::failure("incompatible stack protector");
+
----------------
Suggestion: Improve the failure message to be a bit more descriptive. I.e. mention that it can't inline a function with stack protection into a function without stack protection and vice versa.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87956/new/

https://reviews.llvm.org/D87956



More information about the llvm-commits mailing list