Home | History | Annotate | Download | only in TableGen

Lines Matching defs:Class

85 //      operand class, a mask for all operand positions for that same
86 // class/mnemonic and target features to be checked while trying to match.
94 // 3. For a match success, each operand class that has a 'ParserMethod'
125 class AsmMatcherInfo;
128 class AsmMatcherEmitter {
136 /// ClassInfo - Helper class for storing the information about a particular
137 /// class of operands which can be matched.
143 /// The class for a particular token.
146 /// The (first) register class, subsequent register classes are
150 /// The (first) user defined class, subsequent user defined classes are
155 /// Kind - The class kind, which is either a predefined kind, or (UserClass0 +
156 /// N) for the Nth user defined class.
159 /// SuperClasses - The super classes of this class. Note that for simplicities
160 /// sake user operands only record their immediate super class, while register
164 /// Name - The full class name, suitable for use in an enum.
167 /// ClassName - The unadorned generic name for this class (e.g., Token).
170 /// ValueName - The name of the value this class represents; for a token this
171 /// is the literal token string, for an operand it is the TableGen class (or
172 /// empty if this is a derived class).
176 /// operand matches this class; this is not valid for Token or register kinds.
187 /// For register classes, the records for all the registers in this class.
193 /// isRegisterClass() - Check if this is a register class.
198 /// isUserClass() - Check if this is a user defined class.
203 /// isRelatedTo - Check whether this class is "related" to \p RHS. Classes
204 /// are related if they are in the same class hierarchy.
226 // same class hierarchy.
230 assert(isUserClass() && RHS.isUserClass() && "Unexpected class!");
242 /// isSubsetOf - Test whether this class is a subset of \p RHS.
244 // This is a subset of RHS if it is the same class...
271 // This class precedes the RHS if it is a proper subset of the RHS.
292 /// MatchableInfo - Helper class for storing the necessary information for an
299 /// The unique class instance this operand should match.
300 ClassInfo *Class;
311 explicit AsmOperand(StringRef T) : Token(T), Class(0), SubOpIdx(-1),
420 /// annotated with a class and where in the OperandList they were defined.
495 if (*AsmOperands[i].Class < *RHS.AsmOperands[i].Class)
497 if (*RHS.AsmOperands[i].Class < *AsmOperands[i].Class)
532 if (AsmOperands[i].Class->Kind != RHS.AsmOperands[i].Class->Kind ||
533 AsmOperands[i].Class->Kind == ClassInfo::Token)
534 if (*AsmOperands[i].Class < *RHS.AsmOperands[i].Class ||
535 *RHS.AsmOperands[i].Class < *AsmOperands[i].Class)
543 if (*AsmOperands[i].Class < *RHS.AsmOperands[i].Class)
545 if (*RHS.AsmOperands[i].Class < *AsmOperands[i].Class)
558 /// SubtargetFeatureInfo - Helper class for storing information on a subtarget
591 class AsmMatcherInfo {
611 /// Map of Register records to their class information.
618 /// Map of AsmOperandClass records to their class information.
622 /// Map of token to class information which has already been constructed.
625 /// Map of RegisterClass records to their class information.
629 /// getTokenClass - Lookup or create the class for the given token.
632 /// getOperandClass - Lookup or create the class for the given operand.
683 errs() << " op[" << i << "] = " << Op.Class->ClassName << " - ";
1011 // use it, else just fall back to the underlying register class.
1023 // No custom match class. Just use the register class.
1027 "' has no associated register class!\n");
1030 PrintFatalError(Rec->getLoc(), "register class has no class info!");
1037 PrintFatalError(Rec->getLoc(), "register class has no class info!");
1042 "' does not derive from class Operand!\n");
1047 PrintFatalError(Rec->getLoc(), "operand has no match class!");
1074 // a unique register set class), and build the mapping of registers to the set
1167 assert(CI && "Missing singleton register class info!");
1197 PrintError((*it)->getLoc(), "Invalid super class reference!");
1203 PrintError((*it)->getLoc(), "Invalid super class reference!");
1256 /// that class inside a instruction.
1267 // same class.
1270 if (Op.Class->ParserMethod.empty())
1272 unsigned &OperandMask = OpClassMask[Op.Class];
1276 // Generate operand match info for each mnemonic/operand class pair.
1394 Op.Class = RegisterClasses[RegRecord];
1395 assert(Op.Class && Op.Class->Registers.size() == 1 &&
1396 "Unexpected class for singleton register");
1402 Op.Class = getTokenClass(Token);
1407 Op.Class = getTokenClass(Token);
1467 /// named operand such as $src. Resolve the Class and OperandInfo pointers.
1483 // match class for the asm operand is still the default "ImmAsmOperand",
1503 // Set up the operand class.
1504 Op->Class = getOperandClass(Operands[Idx], Op->SubOpIdx);
1529 /// matching string (e.g. "movsx $src, $dst"), determine what the class of the
1536 // Set up the operand class.
1543 // Use the match class from the Alias definition, not the
1545 // being munged by the match class.
1546 Op.Class = getOperandClass(CGA.ResultOperands[i].getRecord(),
1680 // TargetOperandClass - This is the target's operand class, like X86Operand.
1792 std::string Class;
1793 Class = Op.Class->isRegisterClass() ? "Reg" : Op.Class->ClassName;
1794 Signature += Class;
1800 std::string Name = "CVT_" + (Op.Class->isRegisterClass() ? "Reg" :
1801 Op.Class->RenderMethod);
1820 << Op.Class->RenderMethod << "(Inst, " << OpInfo.MINumOperands
1828 if (Op.Class->isRegisterClass())
1972 /// emitMatchClassEnumeration - Emit the enumeration for match class kinds.
1990 OS << "register class '" << CI.ValueName << "'\n";
1992 OS << "derived register class\n";
1994 OS << "user defined class '" << CI.ValueName << "'\n";
2003 /// emitValidateOperandClass - Emit the function to validate an operand class.
2031 OS << " // '" << CI.ClassName << "' class\n";
2126 /// appropriate match class value.
2450 << " Class;\n";
2478 OS << " /* Operand List Mask, Mnemonic, Operand Class, Features */\n";
2519 // Emit the operand class switch to call the correct custom parser for
2520 // the found operand class.
2589 OS << "tryCustomParseOperand(Operands, it->Class);\n";
2649 // Information for the class declaration.
2729 // Emit the routine to match token strings to their match class.
2735 // Emit the routine to validate an operand against a match class.
2770 // should only end up using a few bits for each class, especially the ones
2843 OS << Op.Class->Name;
2901 // Emit code to compute the class list for this operand vector.