[PATCH] D28404: IRGen: Add optnone attribute on function during O0

Paul Robinson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 6 16:03:40 PST 2017


probinson added inline comments.


================
Comment at: clang/lib/CodeGen/CodeGenModule.cpp:962
+  ShouldAddOptNone &= !D->hasAttr<MinSizeAttr>();
+  ShouldAddOptNone &= !D->hasAttr<ColdAttr>();
+  ShouldAddOptNone &= !F->hasFnAttribute(llvm::Attribute::AlwaysInline);
----------------
chandlerc wrote:
> why is optnone incompatible with *cold*....
Because cold implies OptimizeForSize (just above this).  I take no position on whether that is reasonable.


https://reviews.llvm.org/D28404





More information about the cfe-commits mailing list