summaryrefslogtreecommitdiff
path: root/lib/CodeGen/IfConversion.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-06-15 19:06:07 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-06-15 19:06:07 +0000
commitbf9d02eaf6378c3d35d6202ad803b0374132fc61 (patch)
tree058d1f1ccff551f9eca55731538d366330c4a7a1 /lib/CodeGen/IfConversion.cpp
parent2d7a47a5dbc04f2dc3857d723ae1983606bf8a69 (diff)
downloadllvm-bf9d02eaf6378c3d35d6202ad803b0374132fc61.tar.gz
llvm-bf9d02eaf6378c3d35d6202ad803b0374132fc61.tar.bz2
llvm-bf9d02eaf6378c3d35d6202ad803b0374132fc61.tar.xz
MachineInstr::isPredicable() is no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37599 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/IfConversion.cpp')
-rw-r--r--lib/CodeGen/IfConversion.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/CodeGen/IfConversion.cpp b/lib/CodeGen/IfConversion.cpp
index 93388df854..62e9be7552 100644
--- a/lib/CodeGen/IfConversion.cpp
+++ b/lib/CodeGen/IfConversion.cpp
@@ -447,7 +447,7 @@ void IfConverter::ScanInstructions(BBInfo &BBI) {
if (TID->Flags & M_CLOBBERS_PRED)
BBI.ClobbersPred = true;
- if (!I->isPredicable()) {
+ if ((TID->Flags & M_PREDICABLE) == 0) {
BBI.IsUnpredicable = true;
return;
}
@@ -881,7 +881,8 @@ bool IfConverter::IfConvertDiamond(BBInfo &BBI) {
while (TT != BBI.TrueBB->end() && FT != BBI.FalseBB->end()) {
if (TT->isIdenticalTo(FT))
Dups.push_back(TT); // Will erase these later.
- else if (!TT->isPredicable() && !FT->isPredicable())
+ else if ((TT->getInstrDescriptor()->Flags & M_PREDICABLE) == 0 ||
+ (FT->getInstrDescriptor()->Flags & M_PREDICABLE) == 0)
return false; // Can't if-convert. Abort!
++TT;
++FT;
@@ -890,15 +891,13 @@ bool IfConverter::IfConvertDiamond(BBInfo &BBI) {
// One of the two pathes have more terminators, make sure they are
// all predicable.
while (TT != BBI.TrueBB->end()) {
- if (!TT->isPredicable()) {
+ if ((TT->getInstrDescriptor()->Flags & M_PREDICABLE) == 0)
return false; // Can't if-convert. Abort!
- }
++TT;
}
while (FT != BBI.FalseBB->end()) {
- if (!FT->isPredicable()) {
+ if ((FT->getInstrDescriptor()->Flags & M_PREDICABLE) == 0)
return false; // Can't if-convert. Abort!
- }
++FT;
}
}