[llvm-commits] CVS: llvm/include/llvm/Target/TargetInstrInfo.h
Chris Lattner
lattner at cs.uiuc.edu
Sun Feb 29 00:31:51 PST 2004
Changes in directory llvm/include/llvm/Target:
TargetInstrInfo.h updated: 1.56 -> 1.57
---
Log message:
Eliminate the distinction between "real" and "unreal" instructions
---
Diffs of the changes: (+4 -6)
Index: llvm/include/llvm/Target/TargetInstrInfo.h
diff -u llvm/include/llvm/Target/TargetInstrInfo.h:1.56 llvm/include/llvm/Target/TargetInstrInfo.h:1.57
--- llvm/include/llvm/Target/TargetInstrInfo.h:1.56 Sat Feb 28 23:57:21 2004
+++ llvm/include/llvm/Target/TargetInstrInfo.h Sun Feb 29 00:30:35 2004
@@ -83,27 +83,25 @@
///
class TargetInstrInfo {
const TargetInstrDescriptor* desc; // raw array to allow static init'n
- unsigned descSize; // number of entries in the desc array
+ unsigned NumOpcodes; // number of entries in the desc array
unsigned numRealOpCodes; // number of non-dummy op codes
TargetInstrInfo(const TargetInstrInfo &); // DO NOT IMPLEMENT
void operator=(const TargetInstrInfo &); // DO NOT IMPLEMENT
public:
- TargetInstrInfo(const TargetInstrDescriptor *desc, unsigned descSize,
- unsigned numRealOpCodes);
+ TargetInstrInfo(const TargetInstrDescriptor *desc, unsigned NumOpcodes);
virtual ~TargetInstrInfo();
// Invariant: All instruction sets use opcode #0 as the PHI instruction
enum { PHI = 0 };
- unsigned getNumRealOpCodes() const { return numRealOpCodes; }
- unsigned getNumTotalOpCodes() const { return descSize; }
+ unsigned getNumOpcodes() const { return NumOpcodes; }
/// get - Return the machine instruction descriptor that corresponds to the
/// specified instruction opcode.
///
const TargetInstrDescriptor& get(MachineOpCode opCode) const {
- assert(opCode >= 0 && opCode < (int)descSize);
+ assert((unsigned)opCode < NumOpcodes);
return desc[opCode];
}
More information about the llvm-commits
mailing list