[llvm] 77d33f4 - [Analysis] Remove unused CostModelAnalysis::getInstructionCost helper. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 09:21:54 PDT 2022


Author: Simon Pilgrim
Date: 2022-08-10T17:21:46+01:00
New Revision: 77d33f4c1b1be45a3473895e31e34065f11b3888

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

LOG: [Analysis] Remove unused CostModelAnalysis::getInstructionCost helper. NFCI.

Everything now uses TTI costs calls directly

Added: 
    

Modified: 
    llvm/lib/Analysis/CostModel.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/CostModel.cpp b/llvm/lib/Analysis/CostModel.cpp
index 3c162f604cd5..2b4499636400 100644
--- a/llvm/lib/Analysis/CostModel.cpp
+++ b/llvm/lib/Analysis/CostModel.cpp
@@ -57,14 +57,6 @@ namespace {
         *PassRegistry::getPassRegistry());
     }
 
-    /// Returns the expected cost of the instruction.
-    /// Returns -1 if the cost is unknown.
-    /// Note, this method does not cache the cost calculation and it
-    /// can be expensive in some cases.
-    InstructionCost getInstructionCost(const Instruction *I) const {
-      return TTI->getInstructionCost(I, TargetTransformInfo::TCK_RecipThroughput);
-    }
-
   private:
     void getAnalysisUsage(AnalysisUsage &AU) const override;
     bool runOnFunction(Function &F) override;


        


More information about the llvm-commits mailing list