MLIR  21.0.0git
MeshOps.cpp
Go to the documentation of this file.
1 //===- MeshOps.cpp - MLIR SPIR-V Mesh Ops --------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Defines the mesh operations in the SPIR-V dialect.
10 //
11 //===----------------------------------------------------------------------===//
12 
16 
17 using namespace mlir;
18 
19 //===----------------------------------------------------------------------===//
20 // spirv.EXT.EmitMeshTasks
21 //===----------------------------------------------------------------------===//
22 
23 LogicalResult spirv::EXTEmitMeshTasksOp::verify() {
24  if (Value payload = getPayload()) {
25  // The operand definition restricts type to be SPIRV_AnyPointer, so we can
26  // cast here safely.
27  auto payloadType = cast<spirv::PointerType>(payload.getType());
28  if (payloadType.getStorageClass() !=
29  spirv::StorageClass::TaskPayloadWorkgroupEXT)
30  return emitOpError("payload must be a variable with a storage class of "
31  "TaskPayloadWorkgroupEXT");
32  }
33  return success();
34 }
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Definition: Value.h:96
Include the generated interface declarations.
LogicalResult verify(Operation *op, bool verifyRecursively=true)
Perform (potentially expensive) checks of invariants, used to detect compiler bugs,...
Definition: Verifier.cpp:425