summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/CostModel.cpp
diff options
context:
space:
mode:
authorElena Demikhovsky <elena.demikhovsky@intel.com>2015-12-28 20:10:59 +0000
committerElena Demikhovsky <elena.demikhovsky@intel.com>2015-12-28 20:10:59 +0000
commit549469882803cdfd6e557e979840a80a95169931 (patch)
treef71a859f229f5e477f80c7e946b483d0fd9a67d4 /llvm/lib/Analysis/CostModel.cpp
parent8a01ebda8c19eb66d96eb9d23b365ac92a8ecd26 (diff)
downloadbcm5719-llvm-549469882803cdfd6e557e979840a80a95169931.tar.gz
bcm5719-llvm-549469882803cdfd6e557e979840a80a95169931.zip
Implemented cost model for masked gather and scatter operations
The cost is calculated for all X86 targets. When gather/scatter instruction is not supported we calculate the cost of scalar sequence. Differential revision: http://reviews.llvm.org/D15677 llvm-svn: 256519
Diffstat (limited to 'llvm/lib/Analysis/CostModel.cpp')
-rw-r--r--llvm/lib/Analysis/CostModel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/CostModel.cpp b/llvm/lib/Analysis/CostModel.cpp
index b11f64d4bf0..0383cbfbbe4 100644
--- a/llvm/lib/Analysis/CostModel.cpp
+++ b/llvm/lib/Analysis/CostModel.cpp
@@ -500,12 +500,12 @@ unsigned CostModelAnalysis::getInstructionCost(const Instruction *I) const {
}
case Instruction::Call:
if (const IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) {
- SmallVector<Type*, 4> Tys;
+ SmallVector<Value *, 4> Args;
for (unsigned J = 0, JE = II->getNumArgOperands(); J != JE; ++J)
- Tys.push_back(II->getArgOperand(J)->getType());
+ Args.push_back(II->getArgOperand(J));
return TTI->getIntrinsicInstrCost(II->getIntrinsicID(), II->getType(),
- Tys);
+ Args);
}
return -1;
default:
OpenPOWER on IntegriCloud