[llvm-commits] CVS: reopt/lib/TraceToFunction/TraceToFunction.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Wed May 19 05:11:01 PDT 2004
Changes in directory reopt/lib/TraceToFunction:
TraceToFunction.cpp updated: 1.45 -> 1.46
---
Log message:
Simplifications allowed by new FLI threader and trace cloner
---
Diffs of the changes: (+1 -22)
Index: reopt/lib/TraceToFunction/TraceToFunction.cpp
diff -u reopt/lib/TraceToFunction/TraceToFunction.cpp:1.45 reopt/lib/TraceToFunction/TraceToFunction.cpp:1.46
--- reopt/lib/TraceToFunction/TraceToFunction.cpp:1.45 Wed May 19 04:59:45 2004
+++ reopt/lib/TraceToFunction/TraceToFunction.cpp Wed May 19 05:10:09 2004
@@ -654,33 +654,12 @@
Instruction &I = *BI;
for (unsigned i = 0; i < I.getNumOperands (); ++i) {
Value *V = I.getOperand (i);
- // Fold Phi sources which come from FLI blocks
- if (isa<PHINode> (&I))
- if (BasicBlock *phiSource = dyn_cast<BasicBlock> (V))
- if (BasicBlock *realSource = getFLIEdgeSource (phiSource))
- V = realSource;
-
- // If the instruction I has an operand which is in the live-in
- // set of the trace, then we must replace that operand with
- // the corresponding argument of F. We can find out which
- // operands to replace by looking them up in
- // TF->LiveInToParameterMap.
- if (TF->LiveInToParameterMap.find (V) != TF->LiveInToParameterMap.end ()){
- DEBUG(WriteAsOperand (std::cerr, V, true, true,
- TF->MatrixFn->getParent ());
- std::cerr << " in instruction:\n " << I << " is argument "
- << TF->LiveInToParameterMap[V] << " in new function\n");
- assert (V->getType () ==
- getFunctionArg (F, TF->LiveInToParameterMap[V])->getType ()
- && "Live-in Value's type doesn't match corresponding arg type");
- I.setOperand(i, getFunctionArg (F, TF->LiveInToParameterMap[V]));
- }
// If the instruction I has an operand which is in the
// trace, that operand will have been cloned into the
// function, and I will still reference the version from
// outside the function. Replace any reference to an operand
// which has had a clone made with a reference to its clone.
- else if (O2CMap.find (V) != O2CMap.end () && O2CMap[V]) {
+ if (O2CMap.find (V) != O2CMap.end () && O2CMap[V]) {
DEBUG(std::cerr << *V << " in instruction " << I
<< " is value " << O2CMap[V] << " in new function\n");
assert (V->getType () == O2CMap[V]->getType ()
More information about the llvm-commits
mailing list