use range loop; NFCI

llvm-svn: 265360
This commit is contained in:
Sanjay Patel 2016-04-04 23:05:06 +00:00
parent 0e15a77d40
commit e77c7de459
1 changed files with 3 additions and 3 deletions

View File

@ -63,9 +63,9 @@ FunctionPass *llvm::createConstantPropagationPass() {
bool ConstantPropagation::runOnFunction(Function &F) {
// Initialize the worklist to all of the instructions ready to process...
std::set<Instruction*> WorkList;
for(inst_iterator i = inst_begin(F), e = inst_end(F); i != e; ++i) {
WorkList.insert(&*i);
}
for (Instruction &I: instructions(&F))
WorkList.insert(&I);
bool Changed = false;
const DataLayout &DL = F.getParent()->getDataLayout();
TargetLibraryInfo *TLI =