summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/CostModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis/CostModel.cpp')
-rw-r--r--llvm/lib/Analysis/CostModel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/CostModel.cpp b/llvm/lib/Analysis/CostModel.cpp
index da790d74524..604cc2af746 100644
--- a/llvm/lib/Analysis/CostModel.cpp
+++ b/llvm/lib/Analysis/CostModel.cpp
@@ -523,7 +523,7 @@ void CostModelAnalysis::print(raw_ostream &OS, const Module*) const {
for (Function::iterator B = F->begin(), BE = F->end(); B != BE; ++B) {
for (BasicBlock::iterator it = B->begin(), e = B->end(); it != e; ++it) {
- Instruction *Inst = it;
+ Instruction *Inst = &*it;
unsigned Cost = getInstructionCost(Inst);
if (Cost != (unsigned)-1)
OS << "Cost Model: Found an estimated cost of " << Cost;
OpenPOWER on IntegriCloud