forked from OSchip/llvm-project
[NFC] Minimal refactor of TTI to avoid clangsa complaint
Differential Revision: https://reviews.llvm.org/D124754
This commit is contained in:
parent
6f81903e89
commit
dd8cf372c5
|
@ -986,8 +986,6 @@ public:
|
|||
}
|
||||
|
||||
Type *Ty = U->getType();
|
||||
Type *OpTy =
|
||||
U->getNumOperands() == 1 ? U->getOperand(0)->getType() : nullptr;
|
||||
unsigned Opcode = Operator::getOpcode(U);
|
||||
auto *I = dyn_cast<Instruction>(U);
|
||||
switch (Opcode) {
|
||||
|
@ -1059,9 +1057,11 @@ public:
|
|||
case Instruction::FPExt:
|
||||
case Instruction::SExt:
|
||||
case Instruction::ZExt:
|
||||
case Instruction::AddrSpaceCast:
|
||||
case Instruction::AddrSpaceCast: {
|
||||
Type *OpTy = U->getOperand(0)->getType();
|
||||
return TargetTTI->getCastInstrCost(
|
||||
Opcode, Ty, OpTy, TTI::getCastContextHint(I), CostKind, I);
|
||||
}
|
||||
case Instruction::Store: {
|
||||
auto *SI = cast<StoreInst>(U);
|
||||
Type *ValTy = U->getOperand(0)->getType();
|
||||
|
|
Loading…
Reference in New Issue