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

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

llvm-svn: 346755
This commit is contained in:
Simon Pilgrim 2018-11-13 13:45:10 +00:00
parent 2fe1076a08
commit 077a42ca9f
2 changed files with 4 additions and 5 deletions

View File

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

View File

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