summaryrefslogtreecommitdiff
path: root/lib/CodeGen/IfConversion.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-06-14 23:34:09 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-06-14 23:34:09 +0000
commitbc198eeba6d6850639c9ed6449b01aec95d7d205 (patch)
tree781f147b7ca0850bde1826f8de6c188a8c895e11 /lib/CodeGen/IfConversion.cpp
parente37e24331c6fb3e83d5fb0c9ce31be619359a52a (diff)
downloadllvm-bc198eeba6d6850639c9ed6449b01aec95d7d205.tar.gz
llvm-bc198eeba6d6850639c9ed6449b01aec95d7d205.tar.bz2
llvm-bc198eeba6d6850639c9ed6449b01aec95d7d205.tar.xz
No really, clear predcessors states.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37581 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/IfConversion.cpp')
-rw-r--r--lib/CodeGen/IfConversion.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/CodeGen/IfConversion.cpp b/lib/CodeGen/IfConversion.cpp
index b1aa31a28e..416c760477 100644
--- a/lib/CodeGen/IfConversion.cpp
+++ b/lib/CodeGen/IfConversion.cpp
@@ -662,13 +662,11 @@ void IfConverter::ReTryPreds(MachineBasicBlock *BB) {
for (MachineBasicBlock::pred_iterator PI = BB->pred_begin(),
E = BB->pred_end(); PI != E; ++PI) {
BBInfo &PBBI = BBAnalysis[(*PI)->getNumber()];
- if (PBBI.IsDone)
+ if (PBBI.IsDone || PBBI.BB == BB)
continue;
- if (PBBI.Kind == ICNotClassfied) {
- assert(!PBBI.IsEnqueued && "Unexpected");
- PBBI.IsAnalyzed = false;
- } else if (PBBI.IsEnqueued && PBBI.BB != BB)
- PBBI.IsEnqueued = false;
+ PBBI.Kind = ICNotClassfied;
+ PBBI.IsAnalyzed = false;
+ PBBI.IsEnqueued = false;
}
}
@@ -769,8 +767,11 @@ bool IfConverter::IfConvertTriangle(BBInfo &BBI) {
if (PBB == BBI.BB)
continue;
BBInfo &PBBI = BBAnalysis[PBB->getNumber()];
- if (PBBI.IsEnqueued)
+ if (PBBI.IsEnqueued) {
+ PBBI.Kind = ICNotClassfied;
+ PBBI.IsAnalyzed = false;
PBBI.IsEnqueued = false;
+ }
}
}