[llvm] r346755 - [TTI] Make TargetTransformInfo::getOperandInfo static. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 13 05:45:10 PST 2018


Author: rksimon
Date: Tue Nov 13 05:45:10 2018
New Revision: 346755

URL: http://llvm.org/viewvc/llvm-project?rev=346755&view=rev
Log:
[TTI] Make TargetTransformInfo::getOperandInfo static. NFCI.

It has no member dependencies and this makes it easier to reuse in other cost analysis code.

Modified:
    llvm/trunk/include/llvm/Analysis/TargetTransformInfo.h
    llvm/trunk/lib/Analysis/TargetTransformInfo.cpp

Modified: llvm/trunk/include/llvm/Analysis/TargetTransformInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/TargetTransformInfo.h?rev=346755&r1=346754&r2=346755&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/TargetTransformInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/TargetTransformInfo.h Tue Nov 13 05:45:10 2018
@@ -744,9 +744,9 @@ public:
   /// and the number of execution units in the CPU.
   unsigned getMaxInterleaveFactor(unsigned VF) const;
 
-  /// Collect properties of V used in cost analyzis, e.g. OP_PowerOf2.
-  OperandValueKind getOperandInfo(Value *V,
-                                  OperandValueProperties &OpProps) const;
+  /// Collect properties of V used in cost analysis, e.g. OP_PowerOf2.
+  static OperandValueKind getOperandInfo(Value *V,
+                                         OperandValueProperties &OpProps);
 
   /// This is an approximation of reciprocal throughput of a math/logic op.
   /// A higher cost indicates less expected throughput.

Modified: llvm/trunk/lib/Analysis/TargetTransformInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/TargetTransformInfo.cpp?rev=346755&r1=346754&r2=346755&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/TargetTransformInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/TargetTransformInfo.cpp Tue Nov 13 05:45:10 2018
@@ -389,8 +389,7 @@ unsigned TargetTransformInfo::getMaxInte
 }
 
 TargetTransformInfo::OperandValueKind
-TargetTransformInfo::getOperandInfo(Value *V,
-                                    OperandValueProperties &OpProps) const {
+TargetTransformInfo::getOperandInfo(Value *V, OperandValueProperties &OpProps) {
   OperandValueKind OpInfo = OK_AnyValue;
   OpProps = OP_None;
 




More information about the llvm-commits mailing list