Author: Xun Li
Date: 2021-01-21T18:38:10-08:00
New Revision: bd3ca6666d14464b1bb7eecbd3cc227ee0614799

URL: 
https://github.com/llvm/llvm-project/commit/bd3ca6666d14464b1bb7eecbd3cc227ee0614799
DIFF: 
https://github.com/llvm/llvm-project/commit/bd3ca6666d14464b1bb7eecbd3cc227ee0614799.diff

LOG: [Inlining] Delete redundant optnone/alwaysinline check

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.

Differential Revision: https://reviews.llvm.org/D95186

Added: 
    

Modified: 
    llvm/lib/Transforms/IPO/Inliner.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/IPO/Inliner.cpp 
b/llvm/lib/Transforms/IPO/Inliner.cpp
index 574d870bccd8..a7d7594c00b3 100644
--- a/llvm/lib/Transforms/IPO/Inliner.cpp
+++ b/llvm/lib/Transforms/IPO/Inliner.cpp
@@ -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");
 


        
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to