Skip to content

Commit 411ded5

Browse files
committed
Add CSE and canonicalize before final conversion to binary.
1 parent 30f2bf7 commit 411ded5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mlir/lib/Dialect/GPU/Pipelines/GPUToXeVMPipeline.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ void buildPostGPUCommonPassPipeline(
106106
pm.addPass(createLowerAffinePass());
107107
pm.addPass(createConvertToLLVMPass());
108108
pm.addPass(createReconcileUnrealizedCastsPass());
109+
pm.addNestedPass<gpu::GPUModuleOp>(createCanonicalizerPass());
110+
pm.addNestedPass<gpu::GPUModuleOp>(createCSEPass());
109111
// gpu-module-to-binary
110112
{
111113
GpuModuleToBinaryPassOptions gpuToModuleBinOptions;

0 commit comments

Comments
 (0)