diff options
author | Jim Laskey <jlaskey@mac.com> | 2006-07-21 20:57:35 +0000 |
---|---|---|
committer | Jim Laskey <jlaskey@mac.com> | 2006-07-21 20:57:35 +0000 |
commit | 60f09928a0d22d5927ff0a40fe9163cf1ba1014a (patch) | |
tree | c0c42c949f5859249d8026578beecb5a1a036b92 /include/llvm/Target/TargetInstrInfo.h | |
parent | 6412f72b0939807fc77b1031a4cebf71c91e48a0 (diff) | |
download | external_llvm-60f09928a0d22d5927ff0a40fe9163cf1ba1014a.zip external_llvm-60f09928a0d22d5927ff0a40fe9163cf1ba1014a.tar.gz external_llvm-60f09928a0d22d5927ff0a40fe9163cf1ba1014a.tar.bz2 |
Use an enumeration to eliminate data relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29249 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetInstrInfo.h')
-rw-r--r-- | include/llvm/Target/TargetInstrInfo.h | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h index ae271d2..905384e 100644 --- a/include/llvm/Target/TargetInstrInfo.h +++ b/include/llvm/Target/TargetInstrInfo.h @@ -90,10 +90,10 @@ const unsigned M_LOOK_UP_PTR_REG_CLASS = 1 << 0; /// class TargetOperandInfo { public: - /// RegClass - This specifies the register class of the operand if the - /// operand is a register. If not, this contains null. - const TargetRegisterClass *RegClass; - unsigned Flags; + /// RegClass - This specifies the register class enumeration of the operand + /// if the operand is a register. If not, this contains 0. + unsigned short RegClass; + unsigned short Flags; /// Currently no other information. }; @@ -146,17 +146,6 @@ public: return get(Opcode).Name; } - const TargetRegisterClass - *getInstrOperandRegClass(const TargetInstrDescriptor *II, unsigned Op) const { - if (Op >= II->numOperands) { - assert((II->Flags & M_VARIABLE_OPS)&& "Invalid operand # of instruction"); - return NULL; - } - const TargetOperandInfo &toi = II->OpInfo[Op]; - return (toi.Flags & M_LOOK_UP_PTR_REG_CLASS) - ? getPointerRegClass() : toi.RegClass; - } - int getNumOperands(MachineOpCode Opcode) const { return get(Opcode).numOperands; } |