[llvm-commits] CVS: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Wed Mar 31 10:31:05 PST 2004
Changes in directory reopt/lib/LightWtProfiling:
UnpackTraceFunction.cpp updated: 1.45 -> 1.46
---
Log message:
Use WriteAsOperand in many places to make debug output shorter and faster.
Don't call getLLVMFunctionPositionInfo from getValueAllocStateFromGlobal. It
isn't needed and it won't work (because the former only has access to
alloc. state saved in the Module).
---
Diffs of the changes: (+5 -4)
Index: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp
diff -u reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.45 reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.46
--- reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.45 Sat Mar 13 13:11:58 2004
+++ reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp Wed Mar 31 10:29:53 2004
@@ -19,6 +19,7 @@
#include "llvm/IntrinsicLowering.h"
#include "llvm/Module.h"
#include "llvm/Argument.h"
+#include "llvm/Assembly/Writer.h"
#include "llvm/Support/InstIterator.h"
#include "Support/Debug.h"
#include "reopt/MappingInfo.h"
@@ -258,7 +259,6 @@
/// variable ExportedFnAllocState exported by PhyRegAlloc.cpp.
///
static AllocInfo getValueAllocStateFromGlobal (Function *F, Value *V) {
- unsigned FI = getLLVMFunctionPositionInfo (F);
// Get the saved PhyRegAlloc state for F out of ExportedFnAllocState:
std::vector<AllocInfo> &FState = ExportedFnAllocState[F];
assert (FState.size () > 0 && "Reg. alloc state for function is empty");
@@ -373,12 +373,13 @@
// to its reg. in the trace.
Value *V = *SI;
DEBUG(std::cerr
- << "UnpackTraceFunction: Looking for alloc state for value: \n"
- << *V << "\n");
+ << "UnpackTraceFunction: Looking for alloc state for value: ";
+ WriteAsOperand (std::cerr, V, true, true, MatrixF->getParent ());
+ std::cerr << "\n");
AllocInfo Source = getValueAllocStateFromModule (MatrixF, V);
DEBUG(std::cerr << "UnpackTraceFunction: Source = " << Source << "\n");
AllocInfo Target =
- getValueAllocStateFromGlobal (TraceF, TF->getCorrespondingValue(V));
+ getValueAllocStateFromGlobal (TraceF, TF->getCorrespondingValue (V));
DEBUG(std::cerr << "UnpackTraceFunction: Target = " << Target << "\n");
if (Source != Target)
EntryCopies.push_back (CopyInfo (Source, Target, &E, V->getType ()));
More information about the llvm-commits
mailing list