diff options
| -rw-r--r-- | lib/Analysis/IPA/CallGraphSCCPass.cpp | 9 | ||||
| -rw-r--r-- | lib/Analysis/LoopPass.cpp | 18 | 
2 files changed, 9 insertions, 18 deletions
| diff --git a/lib/Analysis/IPA/CallGraphSCCPass.cpp b/lib/Analysis/IPA/CallGraphSCCPass.cpp index a7e9dd0..97a4008 100644 --- a/lib/Analysis/IPA/CallGraphSCCPass.cpp +++ b/lib/Analysis/IPA/CallGraphSCCPass.cpp @@ -153,12 +153,9 @@ bool CGPassManager::doFinalization(CallGraph &CG) {  void CallGraphSCCPass::assignPassManager(PMStack &PMS,                                           PassManagerType PreferredType) {    // Find CGPassManager  -  while (!PMS.empty()) { -    if (PMS.top()->getPassManagerType() > PMT_CallGraphPassManager) -      PMS.pop(); -    else; -    break; -  } +  while (!PMS.empty() && +         PMS.top()->getPassManagerType() > PMT_CallGraphPassManager) +    PMS.pop();    CGPassManager *CGP = dynamic_cast<CGPassManager *>(PMS.top()); diff --git a/lib/Analysis/LoopPass.cpp b/lib/Analysis/LoopPass.cpp index a5496a0..f14a9ba 100644 --- a/lib/Analysis/LoopPass.cpp +++ b/lib/Analysis/LoopPass.cpp @@ -261,12 +261,9 @@ bool LPPassManager::runOnFunction(Function &F) {  void LoopPass::preparePassManager(PMStack &PMS) {    // Find LPPassManager  -  while (!PMS.empty()) { -    if (PMS.top()->getPassManagerType() > PMT_LoopPassManager) -      PMS.pop(); -    else; -    break; -  } +  while (!PMS.empty() && +         PMS.top()->getPassManagerType() > PMT_LoopPassManager) +    PMS.pop();    LPPassManager *LPPM = dynamic_cast<LPPassManager *>(PMS.top()); @@ -281,12 +278,9 @@ void LoopPass::preparePassManager(PMStack &PMS) {  void LoopPass::assignPassManager(PMStack &PMS,                                   PassManagerType PreferredType) {    // Find LPPassManager  -  while (!PMS.empty()) { -    if (PMS.top()->getPassManagerType() > PMT_LoopPassManager) -      PMS.pop(); -    else; -    break; -  } +  while (!PMS.empty() && +         PMS.top()->getPassManagerType() > PMT_LoopPassManager) +    PMS.pop();    LPPassManager *LPPM = dynamic_cast<LPPassManager *>(PMS.top()); | 
