summaryrefslogtreecommitdiff
path: root/lib/Target/TargetInstrInfo.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/Target/TargetInstrInfo.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/Target/TargetInstrInfo.cpp')
-rw-r--r--lib/Target/TargetInstrInfo.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Target/TargetInstrInfo.cpp b/lib/Target/TargetInstrInfo.cpp
index 5342dd1872..10a5cdb624 100644
--- a/lib/Target/TargetInstrInfo.cpp
+++ b/lib/Target/TargetInstrInfo.cpp
@@ -18,7 +18,7 @@ using namespace llvm;
/// findTiedToSrcOperand - Returns the operand that is tied to the specified
/// dest operand. Returns -1 if there isn't one.
-int TargetInstrDescriptor::findTiedToSrcOperand(unsigned OpNum) const {
+int TargetInstrDesc::findTiedToSrcOperand(unsigned OpNum) const {
for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
if (i == OpNum)
continue;
@@ -29,22 +29,22 @@ int TargetInstrDescriptor::findTiedToSrcOperand(unsigned OpNum) const {
}
-TargetInstrInfo::TargetInstrInfo(const TargetInstrDescriptor* Desc,
+TargetInstrInfo::TargetInstrInfo(const TargetInstrDesc* Desc,
unsigned numOpcodes)
- : desc(Desc), NumOpcodes(numOpcodes) {
+ : Descriptors(Desc), NumOpcodes(numOpcodes) {
}
TargetInstrInfo::~TargetInstrInfo() {
}
bool TargetInstrInfo::isUnpredicatedTerminator(const MachineInstr *MI) const {
- const TargetInstrDescriptor *TID = MI->getDesc();
- if (!TID->isTerminator()) return false;
+ const TargetInstrDesc &TID = MI->getDesc();
+ if (!TID.isTerminator()) return false;
// Conditional branch is a special case.
- if (TID->isBranch() && !TID->isBarrier())
+ if (TID.isBranch() && !TID.isBarrier())
return true;
- if (!TID->isPredicable())
+ if (!TID.isPredicable())
return true;
return !isPredicated(MI);
}