diff options
author | Chris Lattner <sabre@nondot.org> | 2004-08-11 02:22:39 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-08-11 02:22:39 +0000 |
commit | cf03da0ce913267c4971534e8792297e06535a4e (patch) | |
tree | f4a74645bb4162b33d08b8bfbb7f2cfaadd830f7 /utils/TableGen/CodeGenInstruction.h | |
parent | 552a8428fa67d921d94fde534270811378a1b977 (diff) | |
download | external_llvm-cf03da0ce913267c4971534e8792297e06535a4e.zip external_llvm-cf03da0ce913267c4971534e8792297e06535a4e.tar.gz external_llvm-cf03da0ce913267c4971534e8792297e06535a4e.tar.bz2 |
Start parsing more information from the Operand information
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15644 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenInstruction.h')
-rw-r--r-- | utils/TableGen/CodeGenInstruction.h | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/utils/TableGen/CodeGenInstruction.h b/utils/TableGen/CodeGenInstruction.h index 5269cc7..85be70e 100644 --- a/utils/TableGen/CodeGenInstruction.h +++ b/utils/TableGen/CodeGenInstruction.h @@ -31,15 +31,35 @@ namespace llvm { /// instruction. std::string AsmString; - /// OperandInfo - For each operand declared in the OperandList of the - /// instruction, keep track of its record (which specifies the class of the - /// operand), its type, and the name given to the operand, if any. + /// OperandInfo - The information we keep track of for each operand in the + /// operand list for a tablegen instruction. struct OperandInfo { + /// Rec - The definition this operand is declared as. Record *Rec; + + /// Ty - The MachineValueType of the operand. + /// MVT::ValueType Ty; + + /// Name - If this operand was assigned a symbolic name, this is it, + /// otherwise, it's empty. std::string Name; - OperandInfo(Record *R, MVT::ValueType T, const std::string &N) - : Rec(R), Ty(T), Name(N) {} + + /// PrinterMethodName - The method used to print operands of this type in + /// the asmprinter. + std::string PrinterMethodName; + + /// MIOperandNo - Currently (this is meant to be phased out), some logical + /// operands correspond to multiple MachineInstr operands. In the X86 + /// target for example, one address operand is represented as 4 + /// MachineOperands. Because of this, the operand number in the + /// OperandList may not match the MachineInstr operand num. Until it + /// does, this contains the MI operand index of this operand. + unsigned MIOperandNo; + + OperandInfo(Record *R, MVT::ValueType T, const std::string &N, + const std::string &PMN, unsigned MION) + : Rec(R), Ty(T), Name(N), PrinterMethodName(PMN), MIOperandNo(MION) {} }; /// OperandList - The list of declared operands, along with their declared |