namespace llvm {
class Record;
+ class DagInit;
- struct CodeGenInstruction {
+ class CodeGenInstruction {
+ public:
Record *TheDef; // The actual record defining this instruction.
std::string Name; // Contents of the 'Name' field.
std::string Namespace; // The namespace the instruction is in.
///
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;
unsigned MIOperandNo;
unsigned MINumOperands; // The number of operands.
- OperandInfo(Record *R, MVT::ValueType T, const std::string &N,
- const std::string &PMN, unsigned MION, unsigned MINO)
- : Rec(R), Ty(T), Name(N), PrinterMethodName(PMN), MIOperandNo(MION),
- MINumOperands(MINO) {}
+ /// MIOperandInfo - Default MI operand type. Note an operand may be made
+ /// up of multiple MI operands.
+ DagInit *MIOperandInfo;
+
+ OperandInfo(Record *R, const std::string &N, const std::string &PMN,
+ unsigned MION, unsigned MINO, DagInit *MIOI)
+ : Rec(R), Name(N), PrinterMethodName(PMN), MIOperandNo(MION),
+ MINumOperands(MINO), MIOperandInfo(MIOI) {}
};
/// OperandList - The list of declared operands, along with their declared
/// type (which is a record).
std::vector<OperandInfo> OperandList;
+ /// ConstraintStr - The operand constraints string.
+ ///
+ std::string ConstraintStr;
+
+ /// ConstraintsList - List of constraints, encoded into one unsigned int per
+ /// operand.
+ std::vector<unsigned> ConstraintsList;
+
// Various boolean values we track for the instruction.
bool isReturn;
bool isBranch;
bool isCommutable;
bool isTerminator;
bool hasDelaySlot;
- bool usesCustomDAGSChedInserter;
+ bool usesCustomDAGSchedInserter;
bool hasVariableNumberOfOperands;
+ bool hasCtrlDep;
+ bool noResults;
CodeGenInstruction(Record *R, const std::string &AsmStr);