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

Brian Gaeke gaeke at cs.uiuc.edu
Wed Jul 7 01:48:02 PDT 2004


Changes in directory reopt/lib/TraceToFunction:

TraceToFunction.cpp updated: 1.70 -> 1.71

---
Log message:

Make the LiveIn and LiveOut std::sets private to the TraceFunctionBuilder.


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

Index: reopt/lib/TraceToFunction/TraceToFunction.cpp
diff -u reopt/lib/TraceToFunction/TraceToFunction.cpp:1.70 reopt/lib/TraceToFunction/TraceToFunction.cpp:1.71
--- reopt/lib/TraceToFunction/TraceToFunction.cpp:1.70	Wed Jul  7 01:37:14 2004
+++ reopt/lib/TraceToFunction/TraceToFunction.cpp	Wed Jul  7 01:47:15 2004
@@ -52,6 +52,10 @@
   BranchNumberMap BranchNumber;
   TraceFunction *TF;
   std::vector<BasicBlock *> AlternateEntryPointsV;
+
+  LiveVariableSet LiveInSet;
+  LiveVariableSet LiveOutSet;
+
   void getTraceLiveInSet (LiveVariableSet &S, LiveVariableVector &LVV,
                           Trace &T);
   void getTraceLiveOutSet (LiveVariableSet &S, LiveVariableVector &LVV,
@@ -219,7 +223,7 @@
     }
 }
 
-/// getTraceLiveInSet - Initialize TF->LiveInSet with the live-in set of the
+/// getTraceLiveInSet - Initialize LiveInSet with the live-in set of the
 /// trace.  Any variable which is used in the trace is potentially live-in,
 /// EXCEPT if it's a constant or a global, OR it is defined before being used
 /// in the trace.
@@ -653,7 +657,7 @@
     // their value from the argument which carries the live-in value.
     for (BasicBlock::iterator BI = srcB->begin ();
          PHINode *oldPN = dyn_cast<PHINode> (BI); ++BI) {
-      assert (TF->LiveInSet.find (oldPN) != TF->LiveInSet.end ()
+      assert (LiveInSet.find (oldPN) != LiveInSet.end ()
               && "Phi nodes in trace entry BB must be live-in");
       Argument *phiLiveIn = getFunctionArg (F,
                                             TF->LiveInToParameterMap [oldPN]);
@@ -833,8 +837,8 @@
 
   // Get some information about the trace's relationship to its parent
   // function.
-  getTraceLiveInSet (TF->LiveInSet, TF->LiveInVector, T);
-  getTraceLiveOutSet (TF->LiveOutSet, TF->LiveOutVector, T);
+  getTraceLiveInSet (LiveInSet, TF->LiveInVector, T);
+  getTraceLiveOutSet (LiveOutSet, TF->LiveOutVector, T);
   TypeVector P =
     createFunctionArgTypeVector (createLiveOutType (TF->LiveOutVector),
                                  TF->LiveInVector);





More information about the llvm-commits mailing list