Lines Matching defs:opVar
533 StringRef opVar, StringRef operandList,
536 << formatv("if (auto attr = {0}->getAttr(\"{1}\")) {{\n", opVar, attrName);
543 operandList, opVar, baseEnum.getCppNamespace(),
576 opVar, attrTypeID);
595 StringRef tabs, StringRef opVar,
626 << formatv("for (Value operand : {0}->getOperands()) {{\n", opVar);
635 tabs, opVar, operands, attr.name, os);
649 << formatv(" for (auto arg : {0}.getODSOperands({1})) {{\n", opVar,
656 opVar, operandNum);
666 loc, newtabs, opVar, operands, attr->name, os);
678 StringRef tabs, StringRef opVar,
687 opVar, resultTypeID);
694 << formatv("valueIDMap[{0}.getResult()] = {1};\n", opVar, resultID);
702 /// decorations on the `resultID` of the serialized operation `opVar` in the
705 StringRef opVar, StringRef elidedAttrs,
709 os << tabs << formatv("for (auto attr : {0}->getAttrs()) {{\n", opVar);
718 opVar, resultID);
733 StringRef opVar("op"), operands("operands"), elidedAttrs("elidedAttrs"),
738 op.getQualCppClassName(), opVar);
755 opVar, extInstSet, opcode);
765 emitResultSerialization(op, record->getLoc(), " ", opVar, operands,
770 emitArgumentSerialization(op, record->getLoc(), " ", opVar, operands,
775 " (void)encodeExtensionInstruction({0}, \"{1}\", {2}, {3});\n", opVar,
781 opVar);
788 emitDecorationSerialization(op, " ", opVar, elidedAttrs, resultID, os);
795 /// the operation `opVar` based on its opcode.
796 static void initDispatchSerializationFn(StringRef opVar, raw_ostream &os) {
800 opVar);
807 StringRef opVar, raw_ostream &os) {
809 << formatv("if (isa<{0}>({1})) {{\n", op.getQualCppClassName(), opVar);
812 op.getQualCppClassName(), opVar);
818 static void finalizeDispatchSerializationFn(StringRef opVar, raw_ostream &os) {
821 opVar);
1013 wordIndex("wordIndex"), opVar("op"), operands("operands"),
1051 op.getQualCppClassName(), opVar, resultTypes, operands,
1054 os << formatv(" valueMap[{0}] = {1}.getResult();\n\n", valueID, opVar);
1061 os << formatv(" if ({0}.hasTrait<OpTrait::IsTerminator>())\n", opVar);
1192 StringRef opVar("op");
1196 initDispatchSerializationFn(opVar, dSerFn);
1205 emitSerializationDispatch(op, " ", opVar, dSerFn);
1211 finalizeDispatchSerializationFn(opVar, dSerFn);