/// Collect properties of V used in cost analysis, e.g. OP_PowerOf2.
static OperandValueKind getOperandInfo(const Value *V,
OperandValueProperties &OpProps);
+ static OperandValueKind getOperandInfo(const Value *V);
+
/// This is an approximation of reciprocal throughput of a math/logic op.
/// A higher cost indicates less expected throughput.
case Instruction::Store: {
auto *SI = cast<StoreInst>(U);
Type *ValTy = U->getOperand(0)->getType();
- TTI::OperandValueProperties OpVP = TTI::OP_None;
- TTI::OperandValueKind OpVK = TTI::getOperandInfo(U->getOperand(0), OpVP);
+ TTI::OperandValueKind OpVK = TTI::getOperandInfo(U->getOperand(0));
return TargetTTI->getMemoryOpCost(Opcode, ValTy, SI->getAlign(),
SI->getPointerAddressSpace(), CostKind,
OpVK, I);
return OpInfo;
}
+TargetTransformInfo::OperandValueKind
+TargetTransformInfo::getOperandInfo(const Value *V) {
+ OperandValueProperties Discard = OP_None;
+ return getOperandInfo(V, Discard);
+}
+
InstructionCost TargetTransformInfo::getArithmeticInstrCost(
unsigned Opcode, Type *Ty, TTI::TargetCostKind CostKind,
OperandValueKind Opd1Info, OperandValueKind Opd2Info,
Cost += TTI.getMaskedMemoryOpCost(I->getOpcode(), VectorTy, Alignment, AS,
CostKind);
} else {
- TTI::OperandValueProperties OpVP = TTI::OP_None;
- TTI::OperandValueKind OpVK = TTI::getOperandInfo(I->getOperand(0), OpVP);
+ TTI::OperandValueKind OpVK = TTI::getOperandInfo(I->getOperand(0));
Cost += TTI.getMemoryOpCost(I->getOpcode(), VectorTy, Alignment, AS,
CostKind, OpVK, I);
}
const Align Alignment = getLoadStoreAlignment(I);
unsigned AS = getLoadStoreAddressSpace(I);
- TTI::OperandValueProperties OpVP = TTI::OP_None;
- TTI::OperandValueKind OpVK = TTI::getOperandInfo(I->getOperand(0), OpVP);
+ TTI::OperandValueKind OpVK = TTI::getOperandInfo(I->getOperand(0));
return TTI.getAddressComputationCost(ValTy) +
TTI.getMemoryOpCost(I->getOpcode(), ValTy, Alignment, AS,
TTI::TCK_RecipThroughput, OpVK, I);
auto *SI =
cast<StoreInst>(IsReorder ? VL[E->ReorderIndices.front()] : VL0);
Align Alignment = SI->getAlign();
- TTI::OperandValueProperties OpVP = TTI::OP_None;
- TTI::OperandValueKind OpVK = TTI::getOperandInfo(SI->getOperand(0), OpVP);
+ TTI::OperandValueKind OpVK = TTI::getOperandInfo(SI->getOperand(0));
InstructionCost ScalarEltCost = TTI->getMemoryOpCost(
Instruction::Store, ScalarTy, Alignment, 0, CostKind, OpVK, VL0);
InstructionCost ScalarStCost = VecTy->getNumElements() * ScalarEltCost;