diff options
| author | Hal Finkel <hfinkel@anl.gov> | 2015-02-15 15:51:25 +0000 | 
|---|---|---|
| committer | Hal Finkel <hfinkel@anl.gov> | 2015-02-15 15:51:25 +0000 | 
| commit | 8626ed2eae325e6693de604e56345e0fa9e0f54f (patch) | |
| tree | f62e3559ee8a59c3182242ccb2cc341086ecf095 | |
| parent | 92fb2d3803a433e50b748dcdf98d2951312686c8 (diff) | |
| download | bcm5719-llvm-8626ed2eae325e6693de604e56345e0fa9e0f54f.tar.gz bcm5719-llvm-8626ed2eae325e6693de604e56345e0fa9e0f54f.zip  | |
[ADCE] Convert another loop for a range-based for
We can use a range-based for for the operands loop too; NFC.
llvm-svn: 229319
| -rw-r--r-- | llvm/lib/Transforms/Scalar/ADCE.cpp | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/ADCE.cpp b/llvm/lib/Transforms/Scalar/ADCE.cpp index effd87e59a8..f490bb22255 100644 --- a/llvm/lib/Transforms/Scalar/ADCE.cpp +++ b/llvm/lib/Transforms/Scalar/ADCE.cpp @@ -69,11 +69,11 @@ bool ADCE::runOnFunction(Function& F) {    // Propagate liveness backwards to operands.    while (!Worklist.empty()) {      Instruction *Curr = Worklist.pop_back_val(); -    for (Instruction::op_iterator OI = Curr->op_begin(), OE = Curr->op_end(); -         OI != OE; ++OI) +    for (Use &OI : Curr->operands()) {        if (Instruction *Inst = dyn_cast<Instruction>(OI))          if (Alive.insert(Inst).second)            Worklist.push_back(Inst); +    }    }    // The inverse of the live set is the dead set.  These are those instructions  | 

