@@ -283,22 +283,20 @@ static LogicalResult verify(LaunchOp op) {
283
283
// (%size-x = %ssa-use, %size-y = %ssa-use, %size-z = %ssa-use)
284
284
// where %size-* and %iter-* will correspond to the body region arguments.
285
285
static void printSizeAssignment (OpAsmPrinter &p, KernelDim3 size,
286
- ValueRange operands, KernelDim3 ids) {
286
+ KernelDim3 operands, KernelDim3 ids) {
287
287
p << ' (' << ids.x << " , " << ids.y << " , " << ids.z << " ) in (" ;
288
- p << size.x << " = " << operands[ 0 ] << " , " ;
289
- p << size.y << " = " << operands[ 1 ] << " , " ;
290
- p << size.z << " = " << operands[ 2 ] << ' )' ;
288
+ p << size.x << " = " << operands. x << " , " ;
289
+ p << size.y << " = " << operands. y << " , " ;
290
+ p << size.z << " = " << operands. z << ' )' ;
291
291
}
292
292
293
293
static void printLaunchOp (OpAsmPrinter &p, LaunchOp op) {
294
- ValueRange operands = op.getOperands ();
295
-
296
294
// Print the launch configuration.
297
295
p << LaunchOp::getOperationName () << ' ' << op.getBlocksKeyword ();
298
- printSizeAssignment (p, op.getGridSize (), operands. take_front ( 3 ),
296
+ printSizeAssignment (p, op.getGridSize (), op. getGridSizeOperandValues ( ),
299
297
op.getBlockIds ());
300
298
p << ' ' << op.getThreadsKeyword ();
301
- printSizeAssignment (p, op.getBlockSize (), operands. slice ( 3 , 3 ),
299
+ printSizeAssignment (p, op.getBlockSize (), op. getBlockSizeOperandValues ( ),
302
300
op.getThreadIds ());
303
301
304
302
p.printRegion (op.body (), /* printEntryBlockArgs=*/ false );
0 commit comments