diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp --- a/llvm/lib/Transforms/IPO/Inliner.cpp +++ b/llvm/lib/Transforms/IPO/Inliner.cpp @@ -761,12 +761,6 @@ LazyCallGraph::Node &N = *CG.lookup(F); if (CG.lookupSCC(N) != C) continue; - if (!Calls[I].first->getCalledFunction()->hasFnAttribute( - Attribute::AlwaysInline) && - F.hasOptNone()) { - setInlineRemark(*Calls[I].first, "optnone attribute"); - continue; - } LLVM_DEBUG(dbgs() << "Inlining calls in: " << F.getName() << "\n");