@@ -808,9 +808,9 @@ static ParseResult parseBlockArgRegion(OpAsmParser &parser, Region ®ion,
808808 return parser.parseRegion (region, entryBlockArgs);
809809}
810810
811- // See custom<HasDeviceAddrHostEvalInReductionMapPrivateRegion> in the
812- // definition of TargetOp .
813- static ParseResult parseHasDeviceAddrHostEvalInReductionMapPrivateRegion (
811+ // These parseXyz functions correspond to the custom<Xyz> definitions
812+ // in the .td file(s) .
813+ static ParseResult parseTargetOpRegion (
814814 OpAsmParser &parser, Region ®ion,
815815 SmallVectorImpl<OpAsmParser::UnresolvedOperand> &hasDeviceAddrVars,
816816 SmallVectorImpl<Type> &hasDeviceAddrTypes,
@@ -835,7 +835,6 @@ static ParseResult parseHasDeviceAddrHostEvalInReductionMapPrivateRegion(
835835 return parseBlockArgRegion (parser, region, args);
836836}
837837
838- // See custom<InReductionPrivateRegion> in the definition of TaskOp.
839838static ParseResult parseInReductionPrivateRegion (
840839 OpAsmParser &parser, Region ®ion,
841840 SmallVectorImpl<OpAsmParser::UnresolvedOperand> &inReductionVars,
@@ -850,8 +849,6 @@ static ParseResult parseInReductionPrivateRegion(
850849 return parseBlockArgRegion (parser, region, args);
851850}
852851
853- // See custom<InReductionPrivateReductionRegion> in the definition of
854- // TaskloopOp.
855852static ParseResult parseInReductionPrivateReductionRegion (
856853 OpAsmParser &parser, Region ®ion,
857854 SmallVectorImpl<OpAsmParser::UnresolvedOperand> &inReductionVars,
@@ -872,7 +869,6 @@ static ParseResult parseInReductionPrivateReductionRegion(
872869 return parseBlockArgRegion (parser, region, args);
873870}
874871
875- // See custom<PrivateRegion> in the definition of SingleOp.
876872static ParseResult parsePrivateRegion (
877873 OpAsmParser &parser, Region ®ion,
878874 llvm::SmallVectorImpl<OpAsmParser::UnresolvedOperand> &privateVars,
@@ -882,7 +878,6 @@ static ParseResult parsePrivateRegion(
882878 return parseBlockArgRegion (parser, region, args);
883879}
884880
885- // See custom<PrivateReductionRegion> in the definition of LoopOp.
886881static ParseResult parsePrivateReductionRegion (
887882 OpAsmParser &parser, Region ®ion,
888883 llvm::SmallVectorImpl<OpAsmParser::UnresolvedOperand> &privateVars,
@@ -898,7 +893,6 @@ static ParseResult parsePrivateReductionRegion(
898893 return parseBlockArgRegion (parser, region, args);
899894}
900895
901- // See custom<TaskReductionRegion> in the definition of TaskgroupOp.
902896static ParseResult parseTaskReductionRegion (
903897 OpAsmParser &parser, Region ®ion,
904898 SmallVectorImpl<OpAsmParser::UnresolvedOperand> &taskReductionVars,
@@ -910,8 +904,6 @@ static ParseResult parseTaskReductionRegion(
910904 return parseBlockArgRegion (parser, region, args);
911905}
912906
913- // See custom<UseDeviceAddrUseDevicePtrRegion> in the definition of
914- // TargetDataOp.
915907static ParseResult parseUseDeviceAddrUseDevicePtrRegion (
916908 OpAsmParser &parser, Region ®ion,
917909 SmallVectorImpl<OpAsmParser::UnresolvedOperand> &useDeviceAddrVars,
@@ -1073,17 +1065,18 @@ static void printBlockArgRegion(OpAsmPrinter &p, Operation *op, Region ®ion,
10731065 p.printRegion (region, /* printEntryBlockArgs=*/ false );
10741066}
10751067
1076- // See custom<HasDeviceAddrHostEvalInReductionMapPrivateRegion> in the
1077- // definition of TargetOp.
1078- static void printHasDeviceAddrHostEvalInReductionMapPrivateRegion (
1079- OpAsmPrinter &p, Operation *op, Region ®ion,
1080- ValueRange hasDeviceAddrVars, TypeRange hasDeviceAddrTypes,
1081- ValueRange hostEvalVars, TypeRange hostEvalTypes,
1082- ValueRange inReductionVars, TypeRange inReductionTypes,
1083- DenseBoolArrayAttr inReductionByref, ArrayAttr inReductionSyms,
1084- ValueRange mapVars, TypeRange mapTypes, ValueRange privateVars,
1085- TypeRange privateTypes, ArrayAttr privateSyms,
1086- DenseI64ArrayAttr privateMaps) {
1068+ // These parseXyz functions correspond to the custom<Xyz> definitions
1069+ // in the .td file(s).
1070+ static void
1071+ printTargetOpRegion (OpAsmPrinter &p, Operation *op, Region ®ion,
1072+ ValueRange hasDeviceAddrVars, TypeRange hasDeviceAddrTypes,
1073+ ValueRange hostEvalVars, TypeRange hostEvalTypes,
1074+ ValueRange inReductionVars, TypeRange inReductionTypes,
1075+ DenseBoolArrayAttr inReductionByref,
1076+ ArrayAttr inReductionSyms, ValueRange mapVars,
1077+ TypeRange mapTypes, ValueRange privateVars,
1078+ TypeRange privateTypes, ArrayAttr privateSyms,
1079+ DenseI64ArrayAttr privateMaps) {
10871080 AllRegionPrintArgs args;
10881081 args.hasDeviceAddrArgs .emplace (hasDeviceAddrVars, hasDeviceAddrTypes);
10891082 args.hostEvalArgs .emplace (hostEvalVars, hostEvalTypes);
@@ -1094,7 +1087,6 @@ static void printHasDeviceAddrHostEvalInReductionMapPrivateRegion(
10941087 printBlockArgRegion (p, op, region, args);
10951088}
10961089
1097- // See custom<InReductionPrivateRegion> in the definition of TaskOp.
10981090static void printInReductionPrivateRegion (
10991091 OpAsmPrinter &p, Operation *op, Region ®ion, ValueRange inReductionVars,
11001092 TypeRange inReductionTypes, DenseBoolArrayAttr inReductionByref,
@@ -1108,8 +1100,6 @@ static void printInReductionPrivateRegion(
11081100 printBlockArgRegion (p, op, region, args);
11091101}
11101102
1111- // See custom<InReductionPrivateReductionRegion> in the definition of
1112- // TaskloopOp.
11131103static void printInReductionPrivateReductionRegion (
11141104 OpAsmPrinter &p, Operation *op, Region ®ion, ValueRange inReductionVars,
11151105 TypeRange inReductionTypes, DenseBoolArrayAttr inReductionByref,
@@ -1127,7 +1117,6 @@ static void printInReductionPrivateReductionRegion(
11271117 printBlockArgRegion (p, op, region, args);
11281118}
11291119
1130- // See custom<PrivateRegion> in the definition of SingleOp.
11311120static void printPrivateRegion (OpAsmPrinter &p, Operation *op, Region ®ion,
11321121 ValueRange privateVars, TypeRange privateTypes,
11331122 ArrayAttr privateSyms) {
@@ -1137,7 +1126,6 @@ static void printPrivateRegion(OpAsmPrinter &p, Operation *op, Region ®ion,
11371126 printBlockArgRegion (p, op, region, args);
11381127}
11391128
1140- // See custom<PrivateReductionRegion> in the definition of LoopOp.
11411129static void printPrivateReductionRegion (
11421130 OpAsmPrinter &p, Operation *op, Region ®ion, ValueRange privateVars,
11431131 TypeRange privateTypes, ArrayAttr privateSyms,
@@ -1152,7 +1140,6 @@ static void printPrivateReductionRegion(
11521140 printBlockArgRegion (p, op, region, args);
11531141}
11541142
1155- // See custom<TaskReductionRegion> in the definition of TaskgroupOp.
11561143static void printTaskReductionRegion (OpAsmPrinter &p, Operation *op,
11571144 Region ®ion,
11581145 ValueRange taskReductionVars,
@@ -1165,8 +1152,6 @@ static void printTaskReductionRegion(OpAsmPrinter &p, Operation *op,
11651152 printBlockArgRegion (p, op, region, args);
11661153}
11671154
1168- // See custom<UseDeviceAddrUseDevicePtrRegion> in the definition of
1169- // TargetDataOp.
11701155static void printUseDeviceAddrUseDevicePtrRegion (OpAsmPrinter &p, Operation *op,
11711156 Region ®ion,
11721157 ValueRange useDeviceAddrVars,
0 commit comments