Browse Source

[TTI] Make TargetTransformInfo::getOperandInfo static. NFCI.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346755 91177308-0d34-0410-b5e6-96231b3b80d8
Simon Pilgrim 6 years ago
parent
commit
20a1e3c6ac

+ 3 - 3
include/llvm/Analysis/TargetTransformInfo.h

@@ -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.

+ 1 - 2
lib/Analysis/TargetTransformInfo.cpp

@@ -389,8 +389,7 @@ unsigned TargetTransformInfo::getMaxInterleaveFactor(unsigned VF) const {
 }
 
 TargetTransformInfo::OperandValueKind
-TargetTransformInfo::getOperandInfo(Value *V,
-                                    OperandValueProperties &OpProps) const {
+TargetTransformInfo::getOperandInfo(Value *V, OperandValueProperties &OpProps) {
   OperandValueKind OpInfo = OK_AnyValue;
   OpProps = OP_None;