[llvm-commits] CVS: reopt/lib/LightWtProfiling/TraceToFunction.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Sun Nov 9 17:49:12 PST 2003
Changes in directory reopt/lib/LightWtProfiling:
TraceToFunction.cpp updated: 1.14 -> 1.15
---
Log message:
Get rid of a few FIXMEs.
---
Diffs of the changes: (+8 -9)
Index: reopt/lib/LightWtProfiling/TraceToFunction.cpp
diff -u reopt/lib/LightWtProfiling/TraceToFunction.cpp:1.14 reopt/lib/LightWtProfiling/TraceToFunction.cpp:1.15
--- reopt/lib/LightWtProfiling/TraceToFunction.cpp:1.14 Mon Nov 3 01:03:30 2003
+++ reopt/lib/LightWtProfiling/TraceToFunction.cpp Sun Nov 9 17:48:22 2003
@@ -6,8 +6,6 @@
// TODO (also search for FIXME in this file):
// 1) Only let things go into the LiveIn/Out sets for which we have register
// allocation information available. Otherwise abort.
-// a) Also only let things go into the LiveOut sets which definitely define
-// a value (e.g., not "call void ...")
// 2) For each basic block that exits the trace, we need to keep track
// of the address that the "ret" instruction would have returned to.
// Use the mapping information (probably BB TO MI MAP) to translate
@@ -16,6 +14,9 @@
// 3) a) Used before defined --> live-in and live-out: dui bu dui?
// b) Live in and not defined by trace --> not live out.
//
+// Potential optimizations:
+// Get rid of BranchNumber
+//
//===----------------------------------------------------------------------===//
#include "TraceToFunction.h"
@@ -156,9 +157,9 @@
Instruction &I = *BI;
Value *V = &I;
// I is an instruction in B, which is in the trace.
- // (Does it define a value? FIXME)
- if (!DefinedInTraceBeforeUse (V, T))
- S.insert (&I);
+ if (V->getType () != Type::VoidTy) // Don't worry about void Values.
+ if (!DefinedInTraceBeforeUse (V, T))
+ S.insert (&I);
}
}
return S;
@@ -273,8 +274,8 @@
DEBUG(dstB->setName ("trace" + utostr(BBCount++)));
// Add dstB to F.
F->getBasicBlockList ().push_back (dstB);
- // Remember the correspondence between srcB and dstB.
- // FIXME: Should this be something that CloneBasicBlock does?
+ // Remember the correspondence between srcB and dstB. (CloneFunction does
+ // this, but we aren't cloning the whole function.)
O2CMap[srcB] = dstB;
}
}
@@ -475,8 +476,6 @@
}
// Make FB contain a return instruction that returns the
// number of the taken exit-branch. Add it to the end of FB:
- // (FIXME: Numbering the branches in this way is probably
- // unnecessary except in DEBUG mode.)
FB->getInstList ().push_back
(new ReturnInst (ConstantUInt::get (Type::UIntTy,
BranchNumber[BI])));
More information about the llvm-commits
mailing list