diff --git a/mlir/docs/Dialects/SPIR-V.md b/mlir/docs/Dialects/SPIR-V.md --- a/mlir/docs/Dialects/SPIR-V.md +++ b/mlir/docs/Dialects/SPIR-V.md @@ -92,7 +92,7 @@ (de)serialization. * Ops with `mlir.snake_case` names are those that have no corresponding instructions (or concepts) in the binary format. They are introduced to - satisfy MLIR structural requirements. For example, `spv.mlir.module_end` and + satisfy MLIR structural requirements. For example, `spv.mlir.moduleend` and `spv.mlir.merge`. They map to no instructions during (de)serialization. (TODO: consider merging the last two cases and adopting `spv.mlir.` prefix for diff --git a/mlir/docs/SPIRVToLLVMDialectConversion.md b/mlir/docs/SPIRVToLLVMDialectConversion.md --- a/mlir/docs/SPIRVToLLVMDialectConversion.md +++ b/mlir/docs/SPIRVToLLVMDialectConversion.md @@ -787,7 +787,7 @@ `spv.module` is converted into `ModuleOp`. This plays a role of enclosing scope to LLVM ops. At the moment, SPIR-V module attributes are ignored. -`spv._module_end` is mapped to an equivalent terminator `ModuleTerminatorOp`. +`spv.mlir.moduleend` is mapped to an equivalent terminator `ModuleTerminatorOp`. ## `mlir-spirv-cpu-runner` diff --git a/mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td b/mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td --- a/mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td +++ b/mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td @@ -373,7 +373,7 @@ implicitly capture values from the enclosing environment. This op has only one region, which only contains one block. The block - must be terminated via the `spv._module_end` op. + must be terminated via the `spv.mlir.moduleend` op. @@ -443,7 +443,7 @@ // ----- -def SPV_ModuleEndOp : SPV_Op<"_module_end", [InModuleScope, Terminator]> { +def SPV_ModuleEndOp : SPV_Op<"mlir.moduleend", [InModuleScope, Terminator]> { let summary = "The pseudo op that ends a SPIR-V module"; let description = [{ diff --git a/mlir/test/Conversion/SPIRVToLLVM/module-ops-to-llvm.mlir b/mlir/test/Conversion/SPIRVToLLVM/module-ops-to-llvm.mlir --- a/mlir/test/Conversion/SPIRVToLLVM/module-ops-to-llvm.mlir +++ b/mlir/test/Conversion/SPIRVToLLVM/module-ops-to-llvm.mlir @@ -16,7 +16,7 @@ // CHECK: module spv.module Logical GLSL450 { // CHECK: } - spv._module_end + spv.mlir.moduleend } // CHECK: module diff --git a/mlir/test/Dialect/SPIRV/structure-ops.mlir b/mlir/test/Dialect/SPIRV/structure-ops.mlir --- a/mlir/test/Dialect/SPIRV/structure-ops.mlir +++ b/mlir/test/Dialect/SPIRV/structure-ops.mlir @@ -390,10 +390,10 @@ requires #spv.vce attributes {foo = "bar"} { } -// Module with explicit spv._module_end +// Module with explicit spv.mlir.moduleend // CHECK: spv.module spv.module Logical GLSL450 { - spv._module_end + spv.mlir.moduleend } // Module with function @@ -442,8 +442,8 @@ // ----- // Module with wrong terminator -// expected-error@+2 {{expects regions to end with 'spv._module_end'}} -// expected-note@+1 {{in custom textual format, the absence of terminator implies 'spv._module_end'}} +// expected-error@+2 {{expects regions to end with 'spv.mlir.moduleend'}} +// expected-note@+1 {{in custom textual format, the absence of terminator implies 'spv.mlir.moduleend'}} "spv.module"() ({ %0 = spv.constant true }) {addressing_model = 0 : i32, memory_model = 1 : i32} : () -> () @@ -477,12 +477,12 @@ // ----- //===----------------------------------------------------------------------===// -// spv._module_end +// spv.mlir.moduleend //===----------------------------------------------------------------------===// func @module_end_not_in_module() -> () { // expected-error @+1 {{op must appear in a module-like op's block}} - spv._module_end + spv.mlir.moduleend } // -----