[llvm-commits] CVS: llvm/lib/CodeGen/IfConversion.cpp
Evan Cheng
evan.cheng at apple.com
Thu Jun 14 13:29:14 PDT 2007
Changes in directory llvm/lib/CodeGen:
IfConversion.cpp updated: 1.46 -> 1.47
---
Log message:
Fix some stupid bugs that have effectively disabled if-conversion.
---
Diffs of the changes: (+7 -1)
IfConversion.cpp | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletion(-)
Index: llvm/lib/CodeGen/IfConversion.cpp
diff -u llvm/lib/CodeGen/IfConversion.cpp:1.46 llvm/lib/CodeGen/IfConversion.cpp:1.47
--- llvm/lib/CodeGen/IfConversion.cpp:1.46 Tue Jun 12 19:04:00 2007
+++ llvm/lib/CodeGen/IfConversion.cpp Thu Jun 14 15:28:52 2007
@@ -208,6 +208,7 @@
// marked dead (due to it being predicated), then skip it.
if (!BBI.IsEnqueued || BBI.IsDone)
continue;
+ BBI.IsEnqueued = false;
bool RetVal = false;
switch (BBI.Kind) {
@@ -625,6 +626,7 @@
case ICTriangleFalse:
case ICTriangleFRev:
case ICDiamond:
+ BBI.IsEnqueued = true;
Candidates.push_back(&BBI);
break;
default:
@@ -660,7 +662,7 @@
E = BB->pred_end(); PI != E; ++PI) {
BBInfo &PBBI = BBAnalysis[(*PI)->getNumber()];
if (!PBBI.IsDone && PBBI.Kind == ICNotClassfied) {
- assert(PBBI.IsEnqueued && "Unexpected");
+ assert(!PBBI.IsEnqueued && "Unexpected");
PBBI.IsAnalyzed = false;
}
}
@@ -963,6 +965,7 @@
}
}
+ BBI.IsAnalyzed = false;
BBI.NonPredSize = 0;
std::copy(Cond.begin(), Cond.end(), std::back_inserter(BBI.Predicate));
@@ -1013,4 +1016,7 @@
std::copy(FromBBI.Predicate.begin(), FromBBI.Predicate.end(),
std::back_inserter(ToBBI.Predicate));
FromBBI.Predicate.clear();
+
+ ToBBI.IsAnalyzed = false;
+ FromBBI.IsAnalyzed = false;
}
More information about the llvm-commits
mailing list