aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Bolka <a@bolka.at>2009-07-03 01:42:52 +0000
committerAndreas Bolka <a@bolka.at>2009-07-03 01:42:52 +0000
commit292aef33e1ed71e720f4e8d0b7332a1013398836 (patch)
tree3af92e77e8a4c7db1f565ba1598296367bb3d544 /lib
parent1ff50b380e6f5549f5ddd9e6c390dcb00332e3e9 (diff)
downloadexternal_llvm-292aef33e1ed71e720f4e8d0b7332a1013398836.zip
external_llvm-292aef33e1ed71e720f4e8d0b7332a1013398836.tar.gz
external_llvm-292aef33e1ed71e720f4e8d0b7332a1013398836.tar.bz2
Minor improvement to the LDA debug output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74754 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/LoopDependenceAnalysis.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Analysis/LoopDependenceAnalysis.cpp b/lib/Analysis/LoopDependenceAnalysis.cpp
index a49f181..f605783 100644
--- a/lib/Analysis/LoopDependenceAnalysis.cpp
+++ b/lib/Analysis/LoopDependenceAnalysis.cpp
@@ -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)