[PATCH] D87956: [IR] add fn attr for no_stack_protector; prevent inlining on mismatch
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 4 17:05:43 PST 2020
MaskRay added inline comments.
Herald added a subscriber: pengfei.
================
Comment at: clang/test/Frontend/optimization-remark-missed-inline-stack-protectors.c:1
+// RUN: %clang_cc1 -stack-protector 2 -Rpass-missed=inline -O2 -verify %s -emit-llvm-only
+
----------------
Emm. I am a bit unsure that we need the clang/test/Frontend test. The inlining decision logic is coded into Utils/InlineFunction.cpp and tested by Transforms/Inline/inline_nossp.ll
clang is at a higher layer and does not need to understand the inlining decision.
================
Comment at: llvm/docs/LangRef.rst:1827
+``nossp``
+ This attribute indicates the function should not emit a stack smashing
----------------
Would this be confusing now that both nossp and ssp exist?
Is there an alternative design which can make this extensible? @jdoerfert
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