[PATCH] D95186: [Inlining] Delete redundant optnone/alwaysinline check
Xun Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 21 16:39:49 PST 2021
lxfind created this revision.
lxfind added reviewers: aeubanks, wenlei.
Herald added subscribers: hoy, modimo, hiraditya, eraman.
lxfind requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The same check is done in InlineCost: https://github.com/llvm/llvm-project/blob/8b0bd54d0ec968df28ccc58bbb537a7b7c074ef2/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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D95186
Files:
llvm/lib/Transforms/IPO/Inliner.cpp
Index: llvm/lib/Transforms/IPO/Inliner.cpp
===================================================================
--- llvm/lib/Transforms/IPO/Inliner.cpp
+++ 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");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95186.318355.patch
Type: text/x-patch
Size: 599 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210122/c9b0ced9/attachment.bin>
More information about the llvm-commits
mailing list