[llvm-commits] CVS: llvm/lib/Reoptimizer/LightWtProfiling/Trigger/Trace.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Tue Aug 19 14:24:02 PDT 2003
Changes in directory llvm/lib/Reoptimizer/LightWtProfiling/Trigger:
Trace.cpp updated: 1.1 -> 1.2
---
Log message:
Use AsmWriter's WriteAsOperand(). This probably isn't the way we're
really going to serialize Traces, but it should make good enough debugging
output.
---
Diffs of the changes:
Index: llvm/lib/Reoptimizer/LightWtProfiling/Trigger/Trace.cpp
diff -u llvm/lib/Reoptimizer/LightWtProfiling/Trigger/Trace.cpp:1.1 llvm/lib/Reoptimizer/LightWtProfiling/Trigger/Trace.cpp:1.2
--- llvm/lib/Reoptimizer/LightWtProfiling/Trigger/Trace.cpp:1.1 Tue Aug 19 13:19:38 2003
+++ llvm/lib/Reoptimizer/LightWtProfiling/Trigger/Trace.cpp Tue Aug 19 14:23:10 2003
@@ -7,20 +7,20 @@
#include "Trace.h"
#include "llvm/Function.h"
-#include "llvm/SlotCalculator.h"
+#include "llvm/Assembly/Writer.h"
#include <iostream>
/// print - Write trace to output stream.
///
void Trace::print (std::ostream &O) const {
Function *F = getFunction ();
- SlotCalculator Table (F, false);
- O << "; Trace from function " << F->getName () << ", blocks = (";
+ O << "; Trace from function " << F->getName () << ", blocks:\n";
for (const_iterator i = begin (), e = end (); i != e; ++i) {
- const BasicBlock *BB = *i;
- O << "(" << Table.getValSlot (BB) << " \"" << BB->getName () << "\") ";
+ O << "; ";
+ WriteAsOperand (O, *i, true, true, getModule ());
+ O << "\n";
}
- O << ")\n" << "; Trace parent function: \n" << *F;
+ O << "; Trace parent function: \n" << *F;
}
/// dump - Debugger convenience method; writes trace to standard error
More information about the llvm-commits
mailing list