diff options
author | Chris Lattner <sabre@nondot.org> | 2002-12-15 22:16:08 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-12-15 22:16:08 +0000 |
commit | 70535c608d88ce25fb992dba3b6d3d0176153a09 (patch) | |
tree | e6974b50c63c01b22dd42291ba2c3ec0519ef47f | |
parent | c583175e720653182d48a6924948df8a49aaa8fd (diff) |
Export well known instruction opcodes usable by target independant passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5063 91177308-0d34-0410-b5e6-96231b3b80d8
-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; } |