@@ -197,7 +197,7 @@ static void tileAndDistributeToWorkgroup(
197197 // TODO(#16421): Disable decomposition due to failure in bufferization.
198198 // funcPassManager.addPass(
199199 // IREE::LinalgExt::createTileAndDecomposeAttentionPass());
200- funcPassManager.addPass (createCanonicalizerPass ());
200+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
201201 funcPassManager.addPass (createCSEPass ());
202202}
203203
@@ -238,13 +238,13 @@ static void addGPUVectorizationPasses(OpPassManager &funcPassManager,
238238void addGPUVectorizationPassPipeline (OpPassManager &funcPassManager) {
239239 tileAndDistributeToWorkgroup (funcPassManager, /* useForall=*/ false );
240240
241- funcPassManager.addPass (createCanonicalizerPass ());
242- funcPassManager.addPass (createCanonicalizerPass ());
241+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
242+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
243243 funcPassManager.addPass (createCSEPass ());
244244
245245 // Distribute linalg onto threads within the workgroup.
246246 funcPassManager.addPass (createGPUTensorTilePass ());
247- funcPassManager.addPass (createCanonicalizerPass ());
247+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
248248 funcPassManager.addPass (createCSEPass ());
249249
250250 // Linalg -> vector
@@ -365,7 +365,7 @@ void addGPUTileAndFusePassPipeline(OpPassManager &funcPassManager,
365365 GPUApplyTilingLevelPassOptions options;
366366 options.tilingLevel = IREE::GPU::TilingLevel::Reduction;
367367 funcPassManager.addPass (createGPUApplyTilingLevelPass (options));
368- funcPassManager.addPass (createCanonicalizerPass ());
368+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
369369 funcPassManager.addPass (createCSEPass ());
370370 }
371371
@@ -384,15 +384,15 @@ void addGPUTileAndFusePassPipeline(OpPassManager &funcPassManager,
384384 }
385385
386386 funcPassManager.addPass (createPropagateReshapesByExpansionPass ());
387- funcPassManager.addPass (createCanonicalizerPass ());
387+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
388388 funcPassManager.addPass (createCSEPass ());
389389
390390 // Step 4. Tile and fuse tileable ops to subgroups/threads.
391391 {
392392 GPUApplyTilingLevelPassOptions options;
393393 options.tilingLevel = IREE::GPU::TilingLevel::Thread;
394394 funcPassManager.addPass (createGPUApplyTilingLevelPass (options));
395- funcPassManager.addPass (createCanonicalizerPass ());
395+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
396396 funcPassManager.addPass (createCSEPass ());
397397 }
398398 {
@@ -406,7 +406,7 @@ void addGPUTileAndFusePassPipeline(OpPassManager &funcPassManager,
406406 funcPassManager.addPass (iree_compiler::createNormalizeLoopBoundsPass (
407407 NormalizeLoopBoundsPassOptions{/* normalizeFor=*/ false ,
408408 /* normalizeForall=*/ true }));
409- funcPassManager.addPass (createCanonicalizerPass ());
409+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
410410 funcPassManager.addPass (createCSEPass ());
411411
412412 // TODO: This LICM instance is load bearing due to brittleness of the
@@ -489,13 +489,13 @@ void addGPUTileAndFusePassPipeline(OpPassManager &funcPassManager,
489489void addGPUWinogradVectorizePassPipeline (OpPassManager &funcPassManager) {
490490 tileAndDistributeToWorkgroup (funcPassManager, /* useForall=*/ false );
491491
492- funcPassManager.addPass (createCanonicalizerPass ());
493- funcPassManager.addPass (createCanonicalizerPass ());
492+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
493+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
494494 funcPassManager.addPass (createCSEPass ());
495495
496496 // Distribute linalg onto threads within the workgroup.
497497 funcPassManager.addPass (createGPUTilePass ());
498- funcPassManager.addPass (createCanonicalizerPass ());
498+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
499499 funcPassManager.addPass (createCSEPass ());
500500 funcPassManager.addPass (
501501 IREE::LinalgExt::createDecomposeWinogradTransformPass ());
@@ -512,7 +512,7 @@ void addGPUWinogradVectorizePassPipeline(OpPassManager &funcPassManager) {
512512 // Post bufferization optimizations.
513513 funcPassManager.addPass (createIREELoopInvariantCodeMotionPass ());
514514 funcPassManager.addPass (memref::createFoldMemRefAliasOpsPass ());
515- funcPassManager.addPass (createCanonicalizerPass ());
515+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
516516 funcPassManager.addPass (createCSEPass ());
517517 funcPassManager.addPass (createOptimizeVectorTransferPass ());
518518 funcPassManager.addPass (createOptimizeTensorInsertExtractSlicesPass ());
@@ -526,8 +526,8 @@ void addGPUMatmulSimtPassPipeline(OpPassManager &funcPassManager,
526526 const GPUPipelineOptions &options) {
527527 tileAndDistributeToWorkgroup (funcPassManager, /* useForall=*/ false );
528528
529- funcPassManager.addPass (createCanonicalizerPass ());
530- funcPassManager.addPass (createCanonicalizerPass ());
529+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
530+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
531531 funcPassManager.addPass (createCSEPass ());
532532
533533 funcPassManager.addPass (createGPUTensorTileToSerialLoopsPass ());
@@ -727,8 +727,8 @@ void addGPUTransposePassPipeline(OpPassManager &funcPassManager,
727727 const GPUPipelineOptions &options) {
728728 tileAndDistributeToWorkgroup (funcPassManager, /* useForall=*/ false );
729729
730- funcPassManager.addPass (createCanonicalizerPass ());
731- funcPassManager.addPass (createCanonicalizerPass ());
730+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
731+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
732732 funcPassManager.addPass (createCSEPass ());
733733
734734 funcPassManager.addPass (
@@ -844,7 +844,7 @@ void addGPUVectorDistributePassPipeline(OpPassManager &funcPassManager,
844844 funcPassManager.addPass (
845845 IREE::LinalgExt::createConvertAttentionToOnlineAttentionPass ());
846846
847- funcPassManager.addPass (createCanonicalizerPass ());
847+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
848848 funcPassManager.addPass (createCSEPass ());
849849 funcPassManager.addPass (createGPUPromoteMatmulOperandsPass ());
850850
@@ -855,12 +855,12 @@ void addGPUVectorDistributePassPipeline(OpPassManager &funcPassManager,
855855 options.allowZeroSlices = true ;
856856 funcPassManager.addPass (createGPUApplyTilingLevelPass (options));
857857 funcPassManager.addPass (affine::createLoopCoalescingPass ());
858- funcPassManager.addPass (createCanonicalizerPass ());
858+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
859859 funcPassManager.addPass (createCSEPass ());
860860 }
861861
862862 funcPassManager.addPass (IREE::LinalgExt::createDecomposeAttentionPass ());
863- funcPassManager.addPass (createCanonicalizerPass ());
863+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
864864 funcPassManager.addPass (createCSEPass ());
865865
866866 // Set anchors at tensor level for vector distribution later and hoist out
@@ -927,9 +927,9 @@ void addGPUVectorDistributePassPipeline(OpPassManager &funcPassManager,
927927void addGPUWarpReductionPassPipeline (OpPassManager &funcPassManager) {
928928 tileAndDistributeToWorkgroup (funcPassManager, /* useForall=*/ false );
929929 funcPassManager.addPass (createRematerializeParallelOpsPass ());
930- funcPassManager.addPass (createCanonicalizerPass ());
930+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
931931 funcPassManager.addPass (createGPUTileReductionPass ());
932- funcPassManager.addPass (createCanonicalizerPass ());
932+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
933933 funcPassManager.addPass (createCSEPass ());
934934
935935 // Linalg -> vector
@@ -970,11 +970,11 @@ void addGPUWarpReductionPassPipeline(OpPassManager &funcPassManager) {
970970
971971void addGPUPackUnPackPasses (OpPassManager &funcPassManager) {
972972 tileAndDistributeToWorkgroup (funcPassManager, /* useForall=*/ false );
973- funcPassManager.addPass (createCanonicalizerPass ());
973+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
974974 funcPassManager.addPass (createCSEPass ());
975975
976976 funcPassManager.addPass (createGPUTensorTilePass ());
977- funcPassManager.addPass (createCanonicalizerPass ());
977+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass ());
978978 funcPassManager.addPass (createCSEPass ());
979979
980980 funcPassManager.addPass (createDecomposePackUnPackOpsPass (
@@ -1165,7 +1165,7 @@ static void buildLLVMGPUCodegenConfigurationPassPipelineImpl(
11651165 addCommonTargetExecutablePreprocessingPasses (funcPassManager);
11661166 addEncodingToNopPasses (funcPassManager);
11671167 funcPassManager.addPass (createBlockDynamicDimensionsPass);
1168- funcPassManager.addPass (createCanonicalizerPass );
1168+ funcPassManager.addPass (createConfigTrackingCanonicalizerPass );
11691169 funcPassManager.addPass (createCSEPass);
11701170 }
11711171 modulePassManager.addPass (createMaterializeUserConfigsPass ());
0 commit comments