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

Brian Gaeke gaeke at cs.uiuc.edu
Mon May 17 16:38:02 PDT 2004


Changes in directory reopt/lib/TraceToFunction:

TraceToFunction.cpp updated: 1.37 -> 1.38

---
Log message:

If we find FLI blocks in the trace, remove them. We don't want any FLI in the
optimized trace code.


---
Diffs of the changes:  (+9 -0)

Index: reopt/lib/TraceToFunction/TraceToFunction.cpp
diff -u reopt/lib/TraceToFunction/TraceToFunction.cpp:1.37 reopt/lib/TraceToFunction/TraceToFunction.cpp:1.38
--- reopt/lib/TraceToFunction/TraceToFunction.cpp:1.37	Mon May 17 16:30:55 2004
+++ reopt/lib/TraceToFunction/TraceToFunction.cpp	Mon May 17 16:37:13 2004
@@ -384,6 +384,8 @@
   }
 }
 
+static BasicBlock *getFLIEdgeTarget (BasicBlock *BB);
+
 /// fillInFunctionBody - Clone the BBs of T into F, then do all
 /// necessary fixups to ensure that F's new contents are internally
 /// consistent and that the live-outs So get stored in F's first
@@ -392,6 +394,13 @@
 void TraceFunctionBuilder::fillInFunctionBody (Trace &T, Function *F,
 					  LiveVariableSet &So) {
   ValueMap &O2CMap = TF->O2CMap;
+
+  // Remove any FLI blocks which ended up in the trace.
+  Trace::iterator i;
+  while ((i = std::find_if (T.begin (), T.end (), getFLIEdgeTarget))
+         != T.end ())
+    T.erase (i);
+  
   // First copy the basic blocks from the trace.
   cloneTraceBBsIntoFunction (T, F, O2CMap);
 





More information about the llvm-commits mailing list