diff options
-rw-r--r-- | include/llvm/Target/MachineInstrInfo.h | 6 | ||||
-rw-r--r-- | include/llvm/Target/TargetInstrInfo.h | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/Target/MachineInstrInfo.h b/include/llvm/Target/MachineInstrInfo.h index f4a6a7714c..ea16d3dfd8 100644 --- a/include/llvm/Target/MachineInstrInfo.h +++ b/include/llvm/Target/MachineInstrInfo.h @@ -85,6 +85,12 @@ public: MachineInstrInfo(const MachineInstrDescriptor *desc, unsigned descSize, unsigned numRealOpCodes); virtual ~MachineInstrInfo(); + + // Invariant: All instruction sets use opcode #0 as the PHI instruction and + // opcode #1 as the noop instruction. + enum { + PHI = 0, NOOP = 1 + }; unsigned getNumRealOpCodes() const { return numRealOpCodes; } unsigned getNumTotalOpCodes() const { return descSize; } diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h index f4a6a7714c..ea16d3dfd8 100644 --- a/include/llvm/Target/TargetInstrInfo.h +++ b/include/llvm/Target/TargetInstrInfo.h @@ -85,6 +85,12 @@ public: MachineInstrInfo(const MachineInstrDescriptor *desc, unsigned descSize, unsigned numRealOpCodes); virtual ~MachineInstrInfo(); + + // Invariant: All instruction sets use opcode #0 as the PHI instruction and + // opcode #1 as the noop instruction. + enum { + PHI = 0, NOOP = 1 + }; unsigned getNumRealOpCodes() const { return numRealOpCodes; } unsigned getNumTotalOpCodes() const { return descSize; } |