range-for some loops in DAE

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219167 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie 2014-10-06 22:59:29 +00:00
parent 9aba1898be
commit becb20825e

View File

@ -1093,8 +1093,8 @@ bool DAE::runOnModule(Module &M) {
// determine that dead arguments passed into recursive functions are dead).
//
DEBUG(dbgs() << "DAE - Determining liveness\n");
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
SurveyFunction(*I);
for (auto &F : M)
SurveyFunction(F);
// Now, remove all dead arguments and return values from each function in
// turn.
@ -1107,11 +1107,8 @@ bool DAE::runOnModule(Module &M) {
// Finally, look for any unused parameters in functions with non-local
// linkage and replace the passed in parameters with undef.
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) {
Function& F = *I;
for (auto &F : M)
Changed |= RemoveDeadArgumentsFromCallers(F);
}
return Changed;
}