mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
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:
parent
9aba1898be
commit
becb20825e
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user