[llvm-commits] CVS: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp

Brian Gaeke gaeke at cs.uiuc.edu
Fri Jan 30 15:55:01 PST 2004


Changes in directory reopt/lib/LightWtProfiling:

UnpackTraceFunction.cpp updated: 1.36 -> 1.37

---
Log message:

Try looking for special "operand 0" records in PhyRegAlloc saved state.
#if 0-out getSavedStateIndexOfOperandInInstruction() for now so that we
make sure we don't call it.


---
Diffs of the changes:  (+6 -4)

Index: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp
diff -u reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.36 reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.37
--- reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.36	Wed Jan 28 12:48:56 2004
+++ reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp	Fri Jan 30 15:54:10 2004
@@ -180,6 +180,7 @@
   abort ();
 }
 
+#if 0
 static unsigned getSavedStateIndexOfOperandInInstruction (Function *F, Value *V,
                                                           unsigned VI) {
   // FIXME; not yet implemented
@@ -189,6 +190,7 @@
     << "** getSavedStateIndexOfOperandInInstruction() NOT YET IMPLEMENTED **\n";
   abort ();
 }
+#endif
 
 /// Returns the register number or stack position where V can be found in the
 /// machine code for the function F, which it finds by searching the global
@@ -201,14 +203,14 @@
   Instruction *Instr = cast<Instruction> (V);
   unsigned FI = getLLVMFunctionPositionInfo (F);
   unsigned VI = getSavedStateIndexOfInstruction (F, Instr);
-  int VO = getSavedStateIndexOfOperandInInstruction (F, V, VI);
+  //int VO = getSavedStateIndexOfOperandInInstruction (F, V, VI);
   // Reconstruct the AllocInfo for V by searching
   // _llvm_regAllocState.functions[FI] for a tuple that starts with
   // (VI, VO, ...):
   FunctionAllocState *FAllocState = _llvm_regAllocState.functions[FI];
   for (unsigned i = 0; i < FAllocState->numTuples; ++i) {
     OperandAllocState &T = FAllocState->tuples[VI];
-    if (T.Instruction == VI && T.Operand == VO)
+    if (T.Instruction == VI && T.Operand == 0)
       return AllocInfo (T.Instruction, T.Operand,
                         (AllocInfo::AllocStateTy) T.AllocState,
                         T.Placement);
@@ -232,12 +234,12 @@
   // Figure out the indices (VI, VO) that can be used to look up V, which is an
   // operand of some instruction in F, in FState:
   unsigned VI = getSavedStateIndexOfInstruction (F, Instr);
-  int VO = getSavedStateIndexOfOperandInInstruction (F, V, VI);
+  //int VO = getSavedStateIndexOfOperandInInstruction (F, V, VI);
   // Retrieve the AllocInfo for V by searching FState for a tuple that starts
   // with (VI, VO, ...):
   for (unsigned i = 0, s = FState.size (); i < s; ++i) {
     AllocInfo &T = FState[i];
-    if (T.Instruction == VI && T.Operand == VO)
+    if (T.Instruction == VI && T.Operand == 0)
       return T;
   }
   // By this time we had better have found it, otherwise we are about to do bad





More information about the llvm-commits mailing list