[llvm-commits] CVS: reopt/include/reopt/TraceToFunction.h
Brian Gaeke
gaeke at cs.uiuc.edu
Thu Jul 15 14:53:31 PDT 2004
Changes in directory reopt/include/reopt:
TraceToFunction.h updated: 1.20 -> 1.21
---
Log message:
Rename TraceFunction::get --> BuildTraceFunction. Now it takes a ModuleProvider.
Add ArgToLiveOutMap for the benefit of the new epilog rewriter.
---
Diffs of the changes: (+13 -7)
Index: reopt/include/reopt/TraceToFunction.h
diff -u reopt/include/reopt/TraceToFunction.h:1.20 reopt/include/reopt/TraceToFunction.h:1.21
--- reopt/include/reopt/TraceToFunction.h:1.20 Fri Jul 9 14:41:27 2004
+++ reopt/include/reopt/TraceToFunction.h Thu Jul 15 16:53:21 2004
@@ -16,6 +16,7 @@
namespace llvm {
class ReturnInst;
+class ModuleProvider;
typedef std::set<Value *> LiveVariableSet;
typedef std::vector<Value *> LiveVariableVector;
@@ -49,16 +50,12 @@
/// Constructor - you can't have a TraceFunction without a Trace.
/// This gives you a "blank" TraceFunction without a TraceFn or any
- /// live variable sets. If you want those, use TraceFunction::get ()
- /// instead, which performs all the expensive transformations.
+ /// live variable sets. If you want those, use BuildTraceFunction()
+ /// instead, which performs all the expensive transformations
+ /// using a TraceFunctionBuilder object.
///
TraceFunction (Trace &T_) : MatrixFn (T_.getFunction ()), T (T_) { }
- /// Returns a filled-in TraceFunction object with a TraceFn for T,
- /// along with its Live-In and Live-Out variable sets.
- ///
- static TraceFunction *get (Trace &T);
-
/// Map of return instructions in TraceFn -->
/// basic blocks that they are supposed to return to in MatrixFn.
///
@@ -73,6 +70,7 @@
///
ValueMap LiveInToArgMap;
ValueMap LiveOutToArgMap;
+ ValueMap ArgToLiveOutMap;
Value *getCorrespondingValue (const Value *V, bool preferLiveIn = true) {
if (isa<Constant>(V)) return const_cast<Value *> (V);
@@ -90,6 +88,14 @@
}
};
+/// BuildTraceFunction - Returns a new TraceFunction containing the code
+/// in the basic blocks of T, along with live-in and live-out sets,
+/// return block maps, and all the other goodies you would expect to find
+/// in a TraceFunction. This does not modify T's original parent function
+/// (the "matrix function").
+///
+TraceFunction *BuildTraceFunction (Trace &T, ModuleProvider *MP);
+
} // end namespace llvm
#endif // REOPT_TRACETOFUNCTION_H
More information about the llvm-commits
mailing list