Minor improvement to the LDA debug output.
authorAndreas Bolka <a@bolka.at>
Fri, 3 Jul 2009 01:42:52 +0000 (01:42 +0000)
committerAndreas Bolka <a@bolka.at>
Fri, 3 Jul 2009 01:42:52 +0000 (01:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74754 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/LoopDependenceAnalysis.cpp

index a49f18166dc410fbb0e9038ecff3d0769516c1ff..f6057839266f277b602c50ffcd623aab90679fef 100644 (file)
@@ -133,13 +133,18 @@ static void PrintLoopInfo(
     raw_ostream &OS, LoopDependenceAnalysis *LDA, const Loop *L) {
   if (!L->empty()) return; // ignore non-innermost loops
 
+  SmallVector<Instruction*, 8> memrefs;
+  GetMemRefInstrs(L, memrefs);
+
   OS << "Loop at depth " << L->getLoopDepth() << ", header block: ";
   WriteAsOperand(OS, L->getHeader(), false);
   OS << "\n";
 
-  SmallVector<Instruction*, 8> memrefs;
-  GetMemRefInstrs(L, memrefs);
   OS << "  Load/store instructions: " << memrefs.size() << "\n";
+  for (SmallVector<Instruction*, 8>::const_iterator x = memrefs.begin(),
+      end = memrefs.end(); x != end; ++x)
+    OS << "\t" << (x - memrefs.begin()) << ": " << **x;
+
   OS << "  Pairwise dependence results:\n";
   for (SmallVector<Instruction*, 8>::const_iterator x = memrefs.begin(),
       end = memrefs.end(); x != end; ++x)