summaryrefslogtreecommitdiff
path: root/lib/CodeGen/IfConversion.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-07 07:27:27 +0000
committerChris Lattner <sabre@nondot.org>2008-01-07 07:27:27 +0000
commit749c6f6b5ed301c84aac562e414486549d7b98eb (patch)
tree275f34b73cd0673d5e8fdcfe02cdb6d60c5422c2 /lib/CodeGen/IfConversion.cpp
parent682b8aed0779ac0c9a6a13d79ccc1cff3e9730cf (diff)
downloadllvm-749c6f6b5ed301c84aac562e414486549d7b98eb.tar.gz
llvm-749c6f6b5ed301c84aac562e414486549d7b98eb.tar.bz2
llvm-749c6f6b5ed301c84aac562e414486549d7b98eb.tar.xz
rename TargetInstrDescriptor -> TargetInstrDesc.
Make MachineInstr::getDesc return a reference instead of a pointer, since it can never be null. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45695 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/IfConversion.cpp')
-rw-r--r--lib/CodeGen/IfConversion.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/CodeGen/IfConversion.cpp b/lib/CodeGen/IfConversion.cpp
index a98347b486..2b3bdc2c98 100644
--- a/lib/CodeGen/IfConversion.cpp
+++ b/lib/CodeGen/IfConversion.cpp
@@ -460,7 +460,7 @@ MachineBasicBlock::iterator firstNonBranchInst(MachineBasicBlock *BB,
MachineBasicBlock::iterator I = BB->end();
while (I != BB->begin()) {
--I;
- if (!I->getDesc()->isBranch())
+ if (!I->getDesc().isBranch())
break;
}
return I;
@@ -548,12 +548,12 @@ void IfConverter::ScanInstructions(BBInfo &BBI) {
bool SeenCondBr = false;
for (MachineBasicBlock::iterator I = BBI.BB->begin(), E = BBI.BB->end();
I != E; ++I) {
- const TargetInstrDescriptor *TID = I->getDesc();
- if (TID->isNotDuplicable())
+ const TargetInstrDesc &TID = I->getDesc();
+ if (TID.isNotDuplicable())
BBI.CannotBeCopied = true;
bool isPredicated = TII->isPredicated(I);
- bool isCondBr = BBI.IsBrAnalyzable && TID->isConditionalBranch();
+ bool isCondBr = BBI.IsBrAnalyzable && TID.isConditionalBranch();
if (!isCondBr) {
if (!isPredicated)
@@ -590,7 +590,7 @@ void IfConverter::ScanInstructions(BBInfo &BBI) {
if (TII->DefinesPredicate(I, PredDefs))
BBI.ClobbersPred = true;
- if (!TID->isPredicable()) {
+ if (!TID.isPredicable()) {
BBI.IsUnpredicable = true;
return;
}
@@ -1132,10 +1132,10 @@ void IfConverter::CopyAndPredicateBlock(BBInfo &ToBBI, BBInfo &FromBBI,
bool IgnoreBr) {
for (MachineBasicBlock::iterator I = FromBBI.BB->begin(),
E = FromBBI.BB->end(); I != E; ++I) {
- const TargetInstrDescriptor *TID = I->getDesc();
+ const TargetInstrDesc &TID = I->getDesc();
bool isPredicated = TII->isPredicated(I);
// Do not copy the end of the block branches.
- if (IgnoreBr && !isPredicated && TID->isBranch())
+ if (IgnoreBr && !isPredicated && TID.isBranch())
break;
MachineInstr *MI = I->clone();