//===- CodeGenInstruction.h - Instruction Class Wrapper ---------*- C++ -*-===//
-//
+//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
-//
+//
//===----------------------------------------------------------------------===//
//
// This file defines a wrapper class for the 'Instruction' TableGen class.
namespace llvm {
class Record;
+ class DagInit;
struct CodeGenInstruction {
Record *TheDef; // The actual record defining this instruction.
/// 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;
+ Record *Rec;
/// Name - If this operand was assigned a symbolic name, this is it,
/// otherwise, it's empty.
/// OperandList may not match the MachineInstr operand num. Until it
/// does, this contains the MI operand index of this operand.
unsigned MIOperandNo;
+ unsigned MINumOperands; // The number of operands.
+
+ /// MIOperandInfo - Default MI operand type. Note an operand may be made
+ /// up of multiple MI operands.
+ DagInit *MIOperandInfo;
- 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) {}
+ 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;
bool isBranch;
bool isBarrier;
bool isCall;
+ bool isLoad;
+ bool isStore;
bool isTwoAddress;
+ bool isConvertibleToThreeAddress;
+ bool isCommutable;
bool isTerminator;
+ bool hasDelaySlot;
+ bool usesCustomDAGSchedInserter;
+ bool hasVariableNumberOfOperands;
+ bool hasCtrlDep;
CodeGenInstruction(Record *R, const std::string &AsmStr);