Revert "[DebugInfo] Add debug locations to constant SD nodes"
[oota-llvm.git] / lib / Target / PowerPC / PPCLoopPreIncPrep.cpp
index 41cc15ab4190c7f9701074b91585bb05e1a04b09..b6e7799402e19b060afd9f9c802c0e74dbeaf9d9 100644 (file)
@@ -144,13 +144,9 @@ bool PPCLoopPreIncPrep::runOnFunction(Function &F) {
 
   bool MadeChange = false;
 
-  if (LI->empty())
-    return MadeChange;
-
-  for (auto I = df_begin(*LI->begin()), E = df_end(*LI->begin()); I != E; ++I) {
-    Loop *L = *I;
-    MadeChange |= runOnLoop(L);
-  }
+  for (auto I = LI->begin(), IE = LI->end(); I != IE; ++I)
+    for (auto L = df_begin(*I), LE = df_end(*I); L != LE; ++L)
+      MadeChange |= runOnLoop(*L);
 
   return MadeChange;
 }