forked from OSchip/llvm-project
[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:
parent
449f2f7140
commit
bd3ca6666d
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue