summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Alpha/AlphaInstrInfo.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-06-08 21:59:56 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-06-08 21:59:56 +0000
commit5514bbef465c4e10c9c0be9168e02d5cc5434e9f (patch)
treefe9f2aae3b1adb2736791eb81135be34fc94d094 /llvm/lib/Target/Alpha/AlphaInstrInfo.cpp
parentc7ebbaa10e77bb17dbdc48ba5e1710f121c59369 (diff)
downloadbcm5719-llvm-5514bbef465c4e10c9c0be9168e02d5cc5434e9f.tar.gz
bcm5719-llvm-5514bbef465c4e10c9c0be9168e02d5cc5434e9f.zip
Add a utility routine to check for unpredicated terminator instruction.
llvm-svn: 37528
Diffstat (limited to 'llvm/lib/Target/Alpha/AlphaInstrInfo.cpp')
-rw-r--r--llvm/lib/Target/Alpha/AlphaInstrInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/Alpha/AlphaInstrInfo.cpp b/llvm/lib/Target/Alpha/AlphaInstrInfo.cpp
index 299a6071488..15f5f841bc3 100644
--- a/llvm/lib/Target/Alpha/AlphaInstrInfo.cpp
+++ b/llvm/lib/Target/Alpha/AlphaInstrInfo.cpp
@@ -158,14 +158,14 @@ bool AlphaInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,MachineBasicBlock *&TB
std::vector<MachineOperand> &Cond) const {
// If the block has no terminators, it just falls into the block after it.
MachineBasicBlock::iterator I = MBB.end();
- if (I == MBB.begin() || !isTerminatorInstr((--I)->getOpcode()))
+ if (I == MBB.begin() || !isUnpredicatedTerminator(--I))
return false;
// Get the last instruction in the block.
MachineInstr *LastInst = I;
// If there is only one terminator instruction, process it.
- if (I == MBB.begin() || !isTerminatorInstr((--I)->getOpcode())) {
+ if (I == MBB.begin() || !isUnpredicatedTerminator(--I)) {
if (LastInst->getOpcode() == Alpha::BR) {
TBB = LastInst->getOperand(0).getMachineBasicBlock();
return false;
@@ -186,7 +186,7 @@ bool AlphaInstrInfo::AnalyzeBranch(MachineBasicBlock &MBB,MachineBasicBlock *&TB
// If there are three terminators, we don't know what sort of block this is.
if (SecondLastInst && I != MBB.begin() &&
- isTerminatorInstr((--I)->getOpcode()))
+ isUnpredicatedTerminator(--I))
return true;
// If the block ends with Alpha::BR and Alpha::COND_BRANCH_*, handle it.
OpenPOWER on IntegriCloud