summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/SparsePropagation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis/SparsePropagation.cpp')
-rw-r--r--llvm/lib/Analysis/SparsePropagation.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/SparsePropagation.cpp b/llvm/lib/Analysis/SparsePropagation.cpp
index 15b78728a73..87a4fa4e0c2 100644
--- a/llvm/lib/Analysis/SparsePropagation.cpp
+++ b/llvm/lib/Analysis/SparsePropagation.cpp
@@ -303,11 +303,10 @@ void SparseSolver::Solve(Function &F) {
// "I" got into the work list because it made a transition. See if any
// users are both live and in need of updating.
- for (Value::use_iterator UI = I->use_begin(), E = I->use_end();
- UI != E; ++UI) {
- Instruction *U = cast<Instruction>(*UI);
- if (BBExecutable.count(U->getParent())) // Inst is executable?
- visitInst(*U);
+ for (User *U : I->users()) {
+ Instruction *UI = cast<Instruction>(U);
+ if (BBExecutable.count(UI->getParent())) // Inst is executable?
+ visitInst(*UI);
}
}
OpenPOWER on IntegriCloud