[llvm-commits] CVS: reopt/lib/LightWtProfiling/Trace.h TraceToFunction.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Mon Oct 13 12:57:02 PDT 2003
Changes in directory reopt/lib/LightWtProfiling:
Trace.h updated: 1.4 -> 1.5
TraceToFunction.cpp updated: 1.5 -> 1.6
---
Log message:
Get rid of 2 different forms of Trace::dominates().
---
Diffs of the changes: (+3 -7)
Index: reopt/lib/LightWtProfiling/Trace.h
diff -u reopt/lib/LightWtProfiling/Trace.h:1.4 reopt/lib/LightWtProfiling/Trace.h:1.5
--- reopt/lib/LightWtProfiling/Trace.h:1.4 Sat Oct 11 11:41:47 2003
+++ reopt/lib/LightWtProfiling/Trace.h Mon Oct 13 12:56:25 2003
@@ -79,9 +79,7 @@
BasicBlock *getBlock (unsigned i) const { return BasicBlocks[i]; }
bool dominates (const BasicBlock *B1, const BasicBlock *B2,
- const BasicBlock *start);
- bool dominates (const BasicBlock *B1, const BasicBlock *B2);
-
+ const BasicBlock *start = 0);
};
#endif // TRACE_H
Index: reopt/lib/LightWtProfiling/TraceToFunction.cpp
diff -u reopt/lib/LightWtProfiling/TraceToFunction.cpp:1.5 reopt/lib/LightWtProfiling/TraceToFunction.cpp:1.6
--- reopt/lib/LightWtProfiling/TraceToFunction.cpp:1.5 Sat Oct 11 11:43:17 2003
+++ reopt/lib/LightWtProfiling/TraceToFunction.cpp Mon Oct 13 12:56:25 2003
@@ -43,6 +43,8 @@
bool Trace::dominates (const BasicBlock *B1, const BasicBlock *B2,
const BasicBlock *start) {
+ if (!start)
+ return dominates (B1, B2, getEntryBasicBlock ());
if (start == B1) {
return true; // Seen B1 on this path, if we see B2 later it's OK.
} else if (start == B2) {
@@ -59,10 +61,6 @@
}
return true; // Dominates on all successors ==> dominates here too
}
-}
-
-bool Trace::dominates (const BasicBlock *B1, const BasicBlock *B2) {
- return dominates (B1, B2, getEntryBasicBlock ());
}
static bool DefinedInTraceBeforeUse (Value *V, Trace &T) {
More information about the llvm-commits
mailing list