@@ -66,6 +66,11 @@ def ConvertAffineToStandard : Pass<"lower-affine"> {
66
66
`affine.apply`.
67
67
}];
68
68
let constructor = "mlir::createLowerAffinePass()";
69
+ let dependentDialects = [
70
+ "scf::SCFDialect",
71
+ "StandardOpsDialect",
72
+ "vector::VectorDialect"
73
+ ];
69
74
}
70
75
71
76
//===----------------------------------------------------------------------===//
@@ -76,6 +81,7 @@ def ConvertAVX512ToLLVM : Pass<"convert-avx512-to-llvm", "ModuleOp"> {
76
81
let summary = "Convert the operations from the avx512 dialect into the LLVM "
77
82
"dialect";
78
83
let constructor = "mlir::createConvertAVX512ToLLVMPass()";
84
+ let dependentDialects = ["LLVM::LLVMDialect", "LLVM::LLVMAVX512Dialect"];
79
85
}
80
86
81
87
//===----------------------------------------------------------------------===//
@@ -98,6 +104,7 @@ def GpuToLLVMConversionPass : Pass<"gpu-to-llvm", "ModuleOp"> {
98
104
def ConvertGpuOpsToNVVMOps : Pass<"convert-gpu-to-nvvm", "gpu::GPUModuleOp"> {
99
105
let summary = "Generate NVVM operations for gpu operations";
100
106
let constructor = "mlir::createLowerGpuOpsToNVVMOpsPass()";
107
+ let dependentDialects = ["NVVM::NVVMDialect"];
101
108
let options = [
102
109
Option<"indexBitwidth", "index-bitwidth", "unsigned",
103
110
/*default=kDeriveIndexBitwidthFromDataLayout*/"0",
@@ -112,6 +119,7 @@ def ConvertGpuOpsToNVVMOps : Pass<"convert-gpu-to-nvvm", "gpu::GPUModuleOp"> {
112
119
def ConvertGpuOpsToROCDLOps : Pass<"convert-gpu-to-rocdl", "gpu::GPUModuleOp"> {
113
120
let summary = "Generate ROCDL operations for gpu operations";
114
121
let constructor = "mlir::createLowerGpuOpsToROCDLOpsPass()";
122
+ let dependentDialects = ["ROCDL::ROCDLDialect"];
115
123
let options = [
116
124
Option<"indexBitwidth", "index-bitwidth", "unsigned",
117
125
/*default=kDeriveIndexBitwidthFromDataLayout*/"0",
@@ -126,6 +134,7 @@ def ConvertGpuOpsToROCDLOps : Pass<"convert-gpu-to-rocdl", "gpu::GPUModuleOp"> {
126
134
def ConvertGPUToSPIRV : Pass<"convert-gpu-to-spirv", "ModuleOp"> {
127
135
let summary = "Convert GPU dialect to SPIR-V dialect";
128
136
let constructor = "mlir::createConvertGPUToSPIRVPass()";
137
+ let dependentDialects = ["spirv::SPIRVDialect"];
129
138
}
130
139
131
140
//===----------------------------------------------------------------------===//
@@ -136,13 +145,15 @@ def ConvertGpuLaunchFuncToVulkanLaunchFunc
136
145
: Pass<"convert-gpu-launch-to-vulkan-launch", "ModuleOp"> {
137
146
let summary = "Convert gpu.launch_func to vulkanLaunch external call";
138
147
let constructor = "mlir::createConvertGpuLaunchFuncToVulkanLaunchFuncPass()";
148
+ let dependentDialects = ["spirv::SPIRVDialect"];
139
149
}
140
150
141
151
def ConvertVulkanLaunchFuncToVulkanCalls
142
152
: Pass<"launch-func-to-vulkan", "ModuleOp"> {
143
153
let summary = "Convert vulkanLaunch external call to Vulkan runtime external "
144
154
"calls";
145
155
let constructor = "mlir::createConvertVulkanLaunchFuncToVulkanCallsPass()";
156
+ let dependentDialects = ["LLVM::LLVMDialect"];
146
157
}
147
158
148
159
//===----------------------------------------------------------------------===//
@@ -153,6 +164,7 @@ def ConvertLinalgToLLVM : Pass<"convert-linalg-to-llvm", "ModuleOp"> {
153
164
let summary = "Convert the operations from the linalg dialect into the LLVM "
154
165
"dialect";
155
166
let constructor = "mlir::createConvertLinalgToLLVMPass()";
167
+ let dependentDialects = ["scf::SCFDialect", "LLVM::LLVMDialect"];
156
168
}
157
169
158
170
//===----------------------------------------------------------------------===//
@@ -163,6 +175,7 @@ def ConvertLinalgToStandard : Pass<"convert-linalg-to-std", "ModuleOp"> {
163
175
let summary = "Convert the operations from the linalg dialect into the "
164
176
"Standard dialect";
165
177
let constructor = "mlir::createConvertLinalgToStandardPass()";
178
+ let dependentDialects = ["StandardOpsDialect"];
166
179
}
167
180
168
181
//===----------------------------------------------------------------------===//
@@ -172,6 +185,7 @@ def ConvertLinalgToStandard : Pass<"convert-linalg-to-std", "ModuleOp"> {
172
185
def ConvertLinalgToSPIRV : Pass<"convert-linalg-to-spirv", "ModuleOp"> {
173
186
let summary = "Convert Linalg ops to SPIR-V ops";
174
187
let constructor = "mlir::createLinalgToSPIRVPass()";
188
+ let dependentDialects = ["spirv::SPIRVDialect"];
175
189
}
176
190
177
191
//===----------------------------------------------------------------------===//
@@ -182,6 +196,7 @@ def SCFToStandard : Pass<"convert-scf-to-std"> {
182
196
let summary = "Convert SCF dialect to Standard dialect, replacing structured"
183
197
" control flow with a CFG";
184
198
let constructor = "mlir::createLowerToCFGPass()";
199
+ let dependentDialects = ["StandardOpsDialect"];
185
200
}
186
201
187
202
//===----------------------------------------------------------------------===//
@@ -191,6 +206,7 @@ def SCFToStandard : Pass<"convert-scf-to-std"> {
191
206
def ConvertAffineForToGPU : FunctionPass<"convert-affine-for-to-gpu"> {
192
207
let summary = "Convert top-level AffineFor Ops to GPU kernels";
193
208
let constructor = "mlir::createAffineForToGPUPass()";
209
+ let dependentDialects = ["gpu::GPUDialect"];
194
210
let options = [
195
211
Option<"numBlockDims", "gpu-block-dims", "unsigned", /*default=*/"1u",
196
212
"Number of GPU block dimensions for mapping">,
@@ -202,6 +218,7 @@ def ConvertAffineForToGPU : FunctionPass<"convert-affine-for-to-gpu"> {
202
218
def ConvertParallelLoopToGpu : Pass<"convert-parallel-loops-to-gpu"> {
203
219
let summary = "Convert mapped scf.parallel ops to gpu launch operations";
204
220
let constructor = "mlir::createParallelLoopToGpuPass()";
221
+ let dependentDialects = ["AffineDialect", "gpu::GPUDialect"];
205
222
}
206
223
207
224
//===----------------------------------------------------------------------===//
@@ -212,6 +229,7 @@ def ConvertShapeToStandard : Pass<"convert-shape-to-std", "ModuleOp"> {
212
229
let summary = "Convert operations from the shape dialect into the standard "
213
230
"dialect";
214
231
let constructor = "mlir::createConvertShapeToStandardPass()";
232
+ let dependentDialects = ["StandardOpsDialect"];
215
233
}
216
234
217
235
//===----------------------------------------------------------------------===//
@@ -221,6 +239,7 @@ def ConvertShapeToStandard : Pass<"convert-shape-to-std", "ModuleOp"> {
221
239
def ConvertShapeToSCF : FunctionPass<"convert-shape-to-scf"> {
222
240
let summary = "Convert operations from the shape dialect to the SCF dialect";
223
241
let constructor = "mlir::createConvertShapeToSCFPass()";
242
+ let dependentDialects = ["scf::SCFDialect"];
224
243
}
225
244
226
245
//===----------------------------------------------------------------------===//
@@ -230,6 +249,7 @@ def ConvertShapeToSCF : FunctionPass<"convert-shape-to-scf"> {
230
249
def ConvertSPIRVToLLVM : Pass<"convert-spirv-to-llvm", "ModuleOp"> {
231
250
let summary = "Convert SPIR-V dialect to LLVM dialect";
232
251
let constructor = "mlir::createConvertSPIRVToLLVMPass()";
252
+ let dependentDialects = ["LLVM::LLVMDialect"];
233
253
}
234
254
235
255
//===----------------------------------------------------------------------===//
@@ -264,6 +284,7 @@ def ConvertStandardToLLVM : Pass<"convert-std-to-llvm", "ModuleOp"> {
264
284
LLVM IR types.
265
285
}];
266
286
let constructor = "mlir::createLowerToLLVMPass()";
287
+ let dependentDialects = ["LLVM::LLVMDialect"];
267
288
let options = [
268
289
Option<"useAlignedAlloc", "use-aligned-alloc", "bool", /*default=*/"false",
269
290
"Use aligned_alloc in place of malloc for heap allocations">,
@@ -287,11 +308,13 @@ def ConvertStandardToLLVM : Pass<"convert-std-to-llvm", "ModuleOp"> {
287
308
def LegalizeStandardForSPIRV : Pass<"legalize-std-for-spirv"> {
288
309
let summary = "Legalize standard ops for SPIR-V lowering";
289
310
let constructor = "mlir::createLegalizeStdOpsForSPIRVLoweringPass()";
311
+ let dependentDialects = ["spirv::SPIRVDialect"];
290
312
}
291
313
292
314
def ConvertStandardToSPIRV : Pass<"convert-std-to-spirv", "ModuleOp"> {
293
315
let summary = "Convert Standard Ops to SPIR-V dialect";
294
316
let constructor = "mlir::createConvertStandardToSPIRVPass()";
317
+ let dependentDialects = ["spirv::SPIRVDialect"];
295
318
}
296
319
297
320
//===----------------------------------------------------------------------===//
@@ -302,6 +325,7 @@ def ConvertVectorToSCF : FunctionPass<"convert-vector-to-scf"> {
302
325
let summary = "Lower the operations from the vector dialect into the SCF "
303
326
"dialect";
304
327
let constructor = "mlir::createConvertVectorToSCFPass()";
328
+ let dependentDialects = ["AffineDialect", "scf::SCFDialect"];
305
329
let options = [
306
330
Option<"fullUnroll", "full-unroll", "bool", /*default=*/"false",
307
331
"Perform full unrolling when converting vector transfers to SCF">,
@@ -316,6 +340,7 @@ def ConvertVectorToLLVM : Pass<"convert-vector-to-llvm", "ModuleOp"> {
316
340
let summary = "Lower the operations from the vector dialect into the LLVM "
317
341
"dialect";
318
342
let constructor = "mlir::createConvertVectorToLLVMPass()";
343
+ let dependentDialects = ["LLVM::LLVMDialect"];
319
344
let options = [
320
345
Option<"reassociateFPReductions", "reassociate-fp-reductions",
321
346
"bool", /*default=*/"false",
@@ -331,6 +356,7 @@ def ConvertVectorToROCDL : Pass<"convert-vector-to-rocdl", "ModuleOp"> {
331
356
let summary = "Lower the operations from the vector dialect into the ROCDL "
332
357
"dialect";
333
358
let constructor = "mlir::createConvertVectorToROCDLPass()";
359
+ let dependentDialects = ["ROCDL::ROCDLDialect"];
334
360
}
335
361
336
362
#endif // MLIR_CONVERSION_PASSES
0 commit comments