[Inlining] Delete redundant optnone/alwaysinline check

The same check is done in InlineCost: 8b0bd54d0e/llvm/lib/Analysis/InlineCost.cpp (L2537-L2552)
Also, doing a check on the callee here is confusing, because anything that deals with callee should be done in the inner loop where we proecss all calls from the same caller.

Differential Revision: https://reviews.llvm.org/D95186
This commit is contained in:
Xun Li 2021-01-21 18:38:10 -08:00
parent 449f2f7140
commit bd3ca6666d
1 changed files with 0 additions and 6 deletions

View File

@ -761,12 +761,6 @@ PreservedAnalyses InlinerPass::run(LazyCallGraph::SCC &InitialC,
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");