diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar/StructurizeCFG.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/StructurizeCFG.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp b/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp index 802b3e476aa..ff46d81cb4d 100644 --- a/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp +++ b/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp @@ -501,21 +501,21 @@ void StructurizeCFG::collectInfos() { // Reset the visited nodes Visited.clear(); - for (RNVector::reverse_iterator OI = Order.rbegin(), OE = Order.rend(); - OI != OE; ++OI) { + for (RegionNode *RN : reverse(Order)) { - DEBUG(dbgs() << "Visiting: " << - ((*OI)->isSubRegion() ? "SubRegion with entry: " : "") << - (*OI)->getEntry()->getName() << " Loop Depth: " << LI->getLoopDepth((*OI)->getEntry()) << "\n"); + DEBUG(dbgs() << "Visiting: " + << (RN->isSubRegion() ? "SubRegion with entry: " : "") + << RN->getEntry()->getName() << " Loop Depth: " + << LI->getLoopDepth(RN->getEntry()) << "\n"); // Analyze all the conditions leading to a node - gatherPredicates(*OI); + gatherPredicates(RN); // Remember that we've seen this node - Visited.insert((*OI)->getEntry()); + Visited.insert(RN->getEntry()); // Find the last back edges - analyzeLoops(*OI); + analyzeLoops(RN); } } |