[llvm] [mlir] [tosa-fuser] Affine Fusion Pass (PR #107383)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 5 04:34:09 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir

Author: None (asr-compiler)

<details>
<summary>Changes</summary>



---

Patch is 96.43 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/107383.diff


17 Files Affected:

- (added) mlir/include/mlir/Registration/Pipelines.h (+11) 
- (modified) mlir/include/mlir/Transforms/Passes.h (+1) 
- (modified) mlir/include/mlir/Transforms/Passes.td (+6) 
- (modified) mlir/lib/CMakeLists.txt (+1) 
- (added) mlir/lib/Registration/CMakeLists.txt (+13) 
- (added) mlir/lib/Registration/Pipelines.cpp (+57) 
- (modified) mlir/lib/Transforms/CMakeLists.txt (+3) 
- (added) mlir/lib/Transforms/TosaAffineFusion.cpp (+186) 
- (modified) mlir/tools/CMakeLists.txt (+1) 
- (added) mlir/tools/tosa-fuser-opt/CMakeLists.txt (+111) 
- (added) mlir/tools/tosa-fuser-opt/tosa-fuser-opt.cpp (+321) 
- (added) tests/PAF_tosa_add_sub.mlir (+309) 
- (added) tests/PAF_tosa_reduce_max_min.mlir (+425) 
- (added) tests/PAF_tosa_reduce_max_min_diff_axis.mlir (+589) 
- (added) tests/tosa_add_sub.mlir (+5) 
- (added) tests/tosa_reduce_max_min.mlir (+5) 
- (added) tests/tosa_reduce_max_min_diff_axis.mlir (+5) 


``````````diff
diff --git a/mlir/include/mlir/Registration/Pipelines.h b/mlir/include/mlir/Registration/Pipelines.h
new file mode 100644
index 00000000000000..7a063b354bd862
--- /dev/null
+++ b/mlir/include/mlir/Registration/Pipelines.h
@@ -0,0 +1,11 @@
+#include "mlir/Pass/PassRegistry.h"
+#include "llvm/Support/CommandLine.h"
+#include <cstdint>
+
+namespace mlir {
+    struct TosaFuserPipelineOptions : public PassPipelineOptions<TosaFuserPipelineOptions> {
+
+    };
+    void createTosaFuserPipeline(OpPassManager &pm, const TosaFuserPipelineOptions &options, unsigned optLevel);
+    void registerTosaFuserPipeline();
+}
\ No newline at end of file
diff --git a/mlir/include/mlir/Transforms/Passes.h b/mlir/include/mlir/Transforms/Passes.h
index 8e4a43c3f24586..19aa4960955618 100644
--- a/mlir/include/mlir/Transforms/Passes.h
+++ b/mlir/include/mlir/Transforms/Passes.h
@@ -138,6 +138,7 @@ std::unique_ptr<Pass> createCompositeFixedPointPass(
     std::string name, llvm::function_ref<void(OpPassManager &)> populateFunc,
     int maxIterations = 10);
 
+std::unique_ptr<Pass> createTosaAffineFusionPass();
 //===----------------------------------------------------------------------===//
 // Registration
 //===----------------------------------------------------------------------===//
diff --git a/mlir/include/mlir/Transforms/Passes.td b/mlir/include/mlir/Transforms/Passes.td
index 000d9f697618e6..95e2cd8959483a 100644
--- a/mlir/include/mlir/Transforms/Passes.td
+++ b/mlir/include/mlir/Transforms/Passes.td
@@ -577,4 +577,10 @@ def CompositeFixedPointPass : Pass<"composite-fixed-point-pass"> {
   ];
 }
 
+def TosaAffineFusion : Pass<"tosa-affine-fusion"> {
+  let summary = "Fuse Loops lowered from tosa";
+  let constructor = "mlir::createTosaAffineFusionPass()";
+  let dependentDialects = ["affine::AffineDialect"];
+}
+
 #endif // MLIR_TRANSFORMS_PASSES
diff --git a/mlir/lib/CMakeLists.txt b/mlir/lib/CMakeLists.txt
index d25c84a3975db4..435c1dfd0eb97d 100644
--- a/mlir/lib/CMakeLists.txt
+++ b/mlir/lib/CMakeLists.txt
@@ -20,3 +20,4 @@ add_subdirectory(Target)
 add_subdirectory(Tools)
 add_subdirectory(Transforms)
 add_subdirectory(ExecutionEngine)
+add_subdirectory(Registration)
diff --git a/mlir/lib/Registration/CMakeLists.txt b/mlir/lib/Registration/CMakeLists.txt
new file mode 100644
index 00000000000000..4d08e615c062d7
--- /dev/null
+++ b/mlir/lib/Registration/CMakeLists.txt
@@ -0,0 +1,13 @@
+get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
+get_property(conversion_libs GLOBAL PROPERTY MLIR_CONVERSION_LIBS)
+
+add_mlir_library(TosaFuserRegistration
+    Pipelines.cpp
+
+    LINK_LIBS PUBLIC
+    ${dialect_libs}
+    ${conversion_libs}
+    MLIRPass
+    MLIRTransforms
+    MLIRGPUTransforms
+)
\ No newline at end of file
diff --git a/mlir/lib/Registration/Pipelines.cpp b/mlir/lib/Registration/Pipelines.cpp
new file mode 100644
index 00000000000000..e2687cc95c0616
--- /dev/null
+++ b/mlir/lib/Registration/Pipelines.cpp
@@ -0,0 +1,57 @@
+#include "mlir/Registration/Pipelines.h"
+#include "mlir/Conversion/TosaToLinalg/TosaToLinalg.h"
+#include "mlir/Conversion/AffineToStandard/AffineToStandard.h"
+#include "mlir/Conversion/FuncToSPIRV/FuncToSPIRV.h"
+#include "mlir/Conversion/GPUToSPIRV/GPUToSPIRV.h"
+#include "mlir/Conversion/Passes.h"
+#include "mlir/Conversion/ReconcileUnrealizedCasts/ReconcileUnrealizedCasts.h"
+#include "mlir/Conversion/SCFToControlFlow/SCFToControlFlow.h"
+#include "mlir/Conversion/SCFToGPU/SCFToGPU.h"
+#include "mlir/Conversion/SCFToSPIRV/SCFToSPIRV.h"
+#include "mlir/Conversion/VectorToSPIRV/VectorToSPIRVPass.h"
+
+#include "mlir/Dialect/Affine/Passes.h"
+#include "mlir/Dialect/Bufferization/Transforms/Passes.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
+#include "mlir/Dialect/Func/Transforms/Passes.h"
+#include "mlir/Dialect/GPU/IR/GPUDialect.h"
+#include "mlir/Dialect/GPU/Transforms/Passes.h"
+
+#include "mlir/Dialect/Linalg/Passes.h"
+#include "mlir/Dialect/MemRef/Transforms/Passes.h"
+#include "mlir/Dialect/SPIRV/IR/SPIRVOps.h"
+#include "mlir/Dialect/SPIRV/Transforms/Passes.h"
+
+#include "mlir/Pass/PassManager.h"
+#include "mlir/Transforms/Passes.h"
+#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/Process.h"
+#include <optional>
+
+using namespace mlir;
+
+void mlir::createTosaFuserPipeline(OpPassManager &pm, const TosaFuserPipelineOptions &options,
+                                   unsigned optLevel) {
+    pm.addNestedPass<func::FuncOp>(tosa::createTosaToLinalg());
+    pm.addPass(bufferization::createEmptyTensorEliminationPass());
+    pm.addNestedPass<func::FuncOp>(bufferization::createEmptyTensorToAllocTensorPass());
+    pm.addPass(bufferization::createOneShotBufferizePass());
+    pm.addPass(func::createFuncBufferizePass());
+    pm.addPass(createCanonicalizerPass());
+    pm.addPass(createConvertLinalgToAffineLoopsPass());
+
+    pm.addPass(createTosaAffineFusionPass());
+}
+
+static void tosaFuser3(OpPassManager &pm, const TosaFuserPipelineOptions &options) {
+    createTosaFuserPipeline(pm, options, 3);
+}
+
+void mlir::registerTosaFuserPipeline () {
+    static bool init_once = []() {
+        PassPipelineRegistration<TosaFuserPipelineOptions>(
+            "O3", "Tosa-Fuser Pipeline O3", tosaFuser3);
+        return true;
+    }();
+}
\ No newline at end of file
diff --git a/mlir/lib/Transforms/CMakeLists.txt b/mlir/lib/Transforms/CMakeLists.txt
index 90c0298fb5e46a..4519619f2652a6 100644
--- a/mlir/lib/Transforms/CMakeLists.txt
+++ b/mlir/lib/Transforms/CMakeLists.txt
@@ -20,6 +20,7 @@ add_mlir_library(MLIRTransforms
   SymbolPrivatize.cpp
   TopologicalSort.cpp
   ViewOpGraph.cpp
+  TosaAffineFusion.cpp
 
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Transforms
@@ -29,6 +30,8 @@ add_mlir_library(MLIRTransforms
 
   LINK_LIBS PUBLIC
   MLIRAnalysis
+  MLIRAffineDialect
+  MLIRFuncDialect
   MLIRCopyOpInterface
   MLIRFunctionInterfaces
   MLIRLoopLikeInterface
diff --git a/mlir/lib/Transforms/TosaAffineFusion.cpp b/mlir/lib/Transforms/TosaAffineFusion.cpp
new file mode 100644
index 00000000000000..81963e5eeba859
--- /dev/null
+++ b/mlir/lib/Transforms/TosaAffineFusion.cpp
@@ -0,0 +1,186 @@
+#include "mlir/Analysis/AliasAnalysis.h"
+#include "mlir/Dialect/Affine/Analysis/Utils.h"
+#include "mlir/Dialect/Affine/IR/AffineOps.h"
+#include "mlir/Dialect/Affine/LoopUtils.h"
+#include "mlir/Dialect/Affine/Utils.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
+#include "mlir/IR/Builders.h"
+#include "mlir/IR/BuiltinAttributes.h"
+#include "mlir/IR/BuiltinTypes.h"
+#include "mlir/IR/Dominance.h"
+#include "mlir/IR/IRMapping.h"
+#include "mlir/Support/LLVM.h"
+#include "mlir/Transforms/Passes.h"
+#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/Support/Debug.h"
+
+namespace mlir {
+#define GEN_PASS_DEF_TOSAAFFINEFUSION
+#include "mlir/Transforms/Passes.h.inc"
+}
+
+#define DEBUG_TYPE "tosa-affine-fusion"
+
+using namespace mlir;
+using namespace mlir::affine;
+
+namespace {
+class TosaAffineFusion : public mlir::impl::TosaAffineFusionBase<TosaAffineFusion> {
+
+public :
+    TosaAffineFusion() = default;
+    void runOnOperation() override;
+    bool checkFusibility(AffineForOp *dstLoop, AffineForOp *srcLoop);
+    void moveIntermediateOps(AffineForOp *dstLoop, AffineForOp *srcLoop);
+    void fuseSiblingLoops(AffineForOp *dstLoop, AffineForOp *srcLoop);
+    bool useInsideLoop(Operation *user, AffineForOp *srcLoop);
+    void fuseLoopsInBlock(Block *block);
+};
+
+bool TosaAffineFusion::checkFusibility(AffineForOp *dstLoop, AffineForOp *srcLoop) {
+    if (dstLoop->getOperation() == srcLoop->getOperation()) {
+        llvm::errs()<<"[CHECKFUSIBILITY LOG] Same Loop\n";
+        return false;
+    }
+
+    if (dstLoop->getOperation()->getParentOp() != srcLoop->getOperation()->getParentOp()) {
+        llvm::errs()<<"[CHECKFUSIBILITY LOG] Parent is not same\n";
+        return false;
+    }
+
+    if (dstLoop->getConstantLowerBound() != srcLoop->getConstantLowerBound()) {
+        llvm::errs()<<"[CHECKFUSIBILITY LOG] Lower Bound is not same\n";
+        return false;
+    }
+
+    if (dstLoop->getConstantUpperBound() != srcLoop->getConstantUpperBound()) {
+        llvm::errs()<<"[CHECKFUSIBILITY LOG] Upper Bound is not same\n";
+        return false;
+    }
+
+    if (dstLoop->getStepAsInt() != srcLoop->getStepAsInt()) {
+        llvm::errs()<<"[CHECKFUSIBILITY LOG] Step is not same\n";
+        return false;
+    }
+
+    llvm::errs()<<"[CHECKFUSIBILITY LOG] SUCCESS\n";
+    return true;
+}
+
+bool TosaAffineFusion::useInsideLoop(Operation *user, AffineForOp *srcLoop) {
+    while (!isa<func::FuncOp>(user->getParentOp())) {
+        auto *parentOp = user->getParentOp();
+        if (user->getParentOp() == srcLoop->getOperation())
+            return true;
+        user = parentOp;
+    }
+    return false;
+}
+
+void TosaAffineFusion::moveIntermediateOps(AffineForOp *dstLoop, AffineForOp *srcLoop) {
+    auto *block = dstLoop->getOperation()->getBlock();
+    bool dstLoopFound = false;
+    for (auto &op : block->getOperations()) {
+        if (&op == dstLoop->getOperation()) {
+            dstLoopFound = true;
+            continue;
+        }
+        if (!dstLoopFound)
+            continue;
+        if (&op == srcLoop->getOperation())
+            break;
+        for (auto *user : op.getUsers())
+            if (useInsideLoop(user, srcLoop))
+                op.moveBefore(dstLoop->getOperation());
+    }
+}
+
+void TosaAffineFusion::fuseSiblingLoops(AffineForOp *dstLoop, AffineForOp *srcLoop) {
+    IRMapping map;
+    map.map(srcLoop->getInductionVar(), dstLoop->getInductionVar());
+    OpBuilder builder(*dstLoop);
+    builder.setInsertionPoint(dstLoop->getBody()->getTerminator());
+
+    for (auto &op : srcLoop->getBody()->getOperations()) {
+        if (&op == srcLoop->getBody()->getTerminator())
+            continue;
+        builder.clone(op, map);
+    }
+}
+
+void TosaAffineFusion::fuseLoopsInBlock(Block *block) {
+    auto affineFors = block->getOps<AffineForOp>();
+    SmallVector<AffineForOp, 4> siblingAffineFors{affineFors.begin(), affineFors.end()};
+
+    for (auto dstLoop : siblingAffineFors) {
+        if (!dstLoop.getOperation()) {
+            llvm::errs()<<"[FUSELOOPSINBLOCK LOG] 1 - DstLoop refernce dropped\n";
+            continue;
+        }
+        llvm::errs()<<"[FUSELOOPSINBLOCK LOG] DstLoop -> \n";
+        dstLoop.dump();
+        if (dstLoop->getParentOp() == nullptr) {
+            llvm::errs()<<"[FUSELOOPSINBLOCK LOG] 2 - DstLoop refernce dropped\n";
+            continue;
+        }
+        for (auto srcLoop : siblingAffineFors) {
+            if (!srcLoop.getOperation()) {
+                llvm::errs()<<"[FUSELOOPSINBLOCK LOG] 1 - SrcLoop refernce dropped\n";
+                continue;
+            }
+            llvm::errs()<<"[FUSELOOPSINBLOCK LOG] SrcLoop -> \n";
+            srcLoop.dump();
+            if (srcLoop->getParentOp() == nullptr) {
+                llvm::errs()<<"[FUSELOOPSINBLOCK LOG] 2 - SrcLoop refernce dropped\n";
+                continue;
+            }
+            if (!checkFusibility(&dstLoop, &srcLoop))
+                continue;
+
+            llvm::errs()<<"[FUSELOOPSINBLOCK LOG] DSTLoop SRCLoop FUSABLE\n";
+
+            moveIntermediateOps(&dstLoop, &srcLoop);
+
+            fuseSiblingLoops(&dstLoop, &srcLoop);
+
+            srcLoop->dropAllReferences();
+            srcLoop->remove();
+
+            llvm::errs()<<"[CHECKFUSIBILITY LOG] New FUSED DSTLoop\n";
+            dstLoop.dump();
+        }
+
+        for (Region &region : dstLoop->getRegions()) {
+            for (Block &block : region.getBlocks()) {
+                auto affineFors = block.getOps<AffineForOp>();
+                if (!affineFors.empty() && !llvm::hasSingleElement(affineFors)) {
+                                llvm::errs()<<"[CHECKFUSIBILITY LOG] Step is not same\n";
+
+                    fuseLoopsInBlock(&block);
+                }
+            }
+        }
+    }
+    llvm::errs()<<"[CHECKFUSIBILITY LOG] Step is not same\n";
+}
+
+void TosaAffineFusion::runOnOperation() {
+    getOperation()->walk([&](Operation *op) {
+        for (Region &region : op->getRegions()) {
+            for (Block &block : region.getBlocks()) {
+                auto affineFors = block.getOps<AffineForOp>();
+                if (!affineFors.empty() && !llvm::hasSingleElement(affineFors)) {
+                    fuseLoopsInBlock(&block);
+                }
+            }
+        }
+    });
+}
+
+} // end of namespace
+
+std::unique_ptr<Pass> mlir::createTosaAffineFusionPass() {
+    return std::make_unique<TosaAffineFusion>();
+}
\ No newline at end of file
diff --git a/mlir/tools/CMakeLists.txt b/mlir/tools/CMakeLists.txt
index 9b474385fdae18..01d80f5743fdeb 100644
--- a/mlir/tools/CMakeLists.txt
+++ b/mlir/tools/CMakeLists.txt
@@ -10,6 +10,7 @@ add_subdirectory(mlir-translate)
 add_subdirectory(mlir-vulkan-runner)
 add_subdirectory(tblgen-lsp-server)
 add_subdirectory(tblgen-to-irdl)
+add_subdirectory(tosa-fuser-opt)
 
 # mlir-cpu-runner requires ExecutionEngine.
 if(MLIR_ENABLE_EXECUTION_ENGINE)
diff --git a/mlir/tools/tosa-fuser-opt/CMakeLists.txt b/mlir/tools/tosa-fuser-opt/CMakeLists.txt
new file mode 100644
index 00000000000000..965cc0138e5b4e
--- /dev/null
+++ b/mlir/tools/tosa-fuser-opt/CMakeLists.txt
@@ -0,0 +1,111 @@
+set(LLVM_OPTIONAL_SOURCES
+  null.cpp
+)
+
+get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
+get_property(conversion_libs GLOBAL PROPERTY MLIR_CONVERSION_LIBS)
+get_property(extension_libs GLOBAL PROPERTY MLIR_EXTENSION_LIBS)
+set(LLVM_LINK_COMPONENTS
+  Core
+  Support
+  AsmParser
+  )
+
+if(MLIR_INCLUDE_TESTS)
+  set(test_libs
+    ${cuda_test_libs}
+    MLIRTestFuncToLLVM
+    MLIRAffineTransformsTestPasses
+    MLIRArithTestPasses
+    MLIRArmNeonTestPasses
+    MLIRArmSMETestPasses
+    MLIRBufferizationTestPasses
+    MLIRControlFlowTestPasses
+    MLIRDLTITestPasses
+    MLIRFuncTestPasses
+    MLIRGPUTestPasses
+    MLIRLinalgTestPasses
+    MLIRLoopLikeInterfaceTestPasses
+    MLIRMathTestPasses
+    MLIRTestMathToVCIX
+    MLIRMemRefTestPasses
+    MLIRMeshTest
+    MLIRNVGPUTestPasses
+    MLIRSCFTestPasses
+    MLIRShapeTestPasses
+    MLIRSPIRVTestPasses
+    MLIRTensorTestPasses
+    MLIRTestAnalysis
+    MLIRTestConvertToSPIRV
+    MLIRTestDialect
+    MLIRTestDynDialect
+    MLIRTestIR
+    MLIRTestOneToNTypeConversionPass
+    MLIRTestPass
+    MLIRTestReducer
+    MLIRTestTransforms
+    MLIRTilingInterfaceTestPasses
+    MLIRVectorTestPasses
+    MLIRTestVectorToSPIRV
+    MLIRLLVMTestPasses
+    )
+  set(test_libs ${test_libs}
+    MLIRTestPDLL
+    MLIRTestTransformDialect
+    )
+
+  if (MLIR_ENABLE_PDL_IN_PATTERNMATCH)
+    set(test_libs ${test_libs}
+      MLIRTestPDLL
+      MLIRTestRewrite
+      )
+  endif()
+endif()
+
+set(LIBS
+  ${dialect_libs}
+  ${conversion_libs}
+  ${extension_libs}
+  ${test_libs}
+
+  MLIRAffineAnalysis
+  MLIRAnalysis
+  MLIRCastInterfaces
+  MLIRDialect
+  MLIROptLib
+  MLIRParser
+  MLIRPass
+  MLIRTransforms
+  MLIRTransformUtils
+  MLIRSupport
+  MLIRIR
+  TosaFuserRegistration
+
+  # TODO: Remove when registerAllGPUToLLVMIRTranslations is no longer
+  # registered directly in tosa-fuser-opt.cpp.
+  MLIRToLLVMIRTranslationRegistration
+  )
+
+# Exclude from libMLIR.so because this has static options intended for
+# opt-like tools only.
+add_mlir_library(MLIRTosaFuserOptMain
+  tosa-fuser-opt.cpp
+
+  EXCLUDE_FROM_LIBMLIR
+
+  LINK_LIBS PUBLIC
+  ${LIBS}
+  )
+
+add_mlir_tool(tosa-fuser-opt
+  tosa-fuser-opt.cpp
+
+  DEPENDS
+  ${LIBS}
+  SUPPORT_PLUGINS
+  )
+target_link_libraries(tosa-fuser-opt PRIVATE ${LIBS})
+llvm_update_compile_flags(tosa-fuser-opt)
+
+mlir_check_all_link_libraries(tosa-fuser-opt)
+export_executable_symbols_for_plugins(tosa-fuser-opt)
diff --git a/mlir/tools/tosa-fuser-opt/tosa-fuser-opt.cpp b/mlir/tools/tosa-fuser-opt/tosa-fuser-opt.cpp
new file mode 100644
index 00000000000000..95a59f44039699
--- /dev/null
+++ b/mlir/tools/tosa-fuser-opt/tosa-fuser-opt.cpp
@@ -0,0 +1,321 @@
+//===- tosa-fuser-opt.cpp - MLIR Optimizer Driver -------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Main entry function for tosa-fuser-opt for when built as standalone binary.
+//
+//===----------------------------------------------------------------------===//
+
+#include "mlir/Config/mlir-config.h"
+#include "mlir/IR/AsmState.h"
+#include "mlir/IR/Dialect.h"
+#include "mlir/IR/MLIRContext.h"
+#include "mlir/InitAllDialects.h"
+#include "mlir/InitAllExtensions.h"
+#include "mlir/InitAllPasses.h"
+#include "mlir/Pass/Pass.h"
+#include "mlir/Pass/PassManager.h"
+#include "mlir/Registration/Pipelines.h"
+#include "mlir/Support/FileUtilities.h"
+#include "mlir/Target/LLVMIR/Dialect/All.h"
+#include "mlir/Tools/mlir-opt/MlirOptMain.h"
+#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/InitLLVM.h"
+#include "llvm/Support/SourceMgr.h"
+#include "llvm/Support/ToolOutputFile.h"
+
+using namespace llvm;
+using namespace mlir;
+
+// Defined in the test directory, no public header.
+namespace mlir {
+void registerCloneTestPasses();
+void registerConvertToTargetEnvPass();
+void registerLazyLoadingTestPasses();
+void registerLoopLikeInterfaceTestPasses();
+void registerPassManagerTestPass();
+void registerPrintSpirvAvailabilityPass();
+void registerRegionTestPasses();
+void registerShapeFunctionTestPasses();
+void registerSideEffectTestPasses();
+void registerSliceAnalysisTestPass();
+void registerSymbolTestPasses();
+void registerTestAffineAccessAnalysisPass();
+void registerTestAffineDataCopyPass();
+void registerTestAffineLoopUnswitchingPass();
+void registerTestAffineReifyValueBoundsPass();
+void registerTestAffineWalk();
+void registerTestBytecodeRoundtripPasses();
+void registerTestDecomposeAffineOpPass();
+void registerTestFunc();
+void registerTestGpuLoweringPasses();
+void registerTestGpuMemoryPromotionPass();
+void registerTestLoopPermutationPass();
+void registerTestMatchers();
+void registerTestOperationEqualPass();
+void registerTestPreserveUseListOrders();
+void registerTestPrintDefUsePass();
+void registerTestPrintInvalidPass();
+void registerTestPrintNestingPass();
+void registerTestReducer();
+void registerTestSpirvEntryPointABIPass();
+void registerTestSpirvModuleCombinerPass();
+void registerTestTraitsPass();
+void registerTosaTestQuantUtilAPIPass();
+void registerVectorizerTestPass();
+
+namespace test {
+void registerCommutativityUtils();
+void registerConvertCallOpPass();
+void registerConvertFuncOpPass();
+void registerInliner();
+void registerMemRefBoundCheck();
+void registerPatternsTestPass();
+void registerSimpleParametricTilingPass();
+void registerTestAffineLoopParametricTilingPass();
+void registerTestAliasAnalysisPass();
+void registerTestArithEmulateWideIntPass();
+void registerTestBuiltinAttributeInterfaces();
+void registerTestBuiltinDistinctAttributes();
+void registerTestCallGraphPass();
+void registerTestCfAssertPass();
+void registerTestCFGLoopInfoPass();
+void registerTestComposeSubView();
+void registerTestCompositePass();
+void registerTestConstantFold();
+void registerTestControlFlowSink();
+void registerTestDataLayoutPropagation();
+void registerTestDataLayoutQuery();
+void registerTestDeadCodeAnalysisPass();
+void registerTestDecomposeCallGraphTypes();
+void registerTestDiagnosticsPass();
+void registerTestDiagnosticsMetadataPass();
+void registerTestDominancePass();
+void registerTestDynamicPipelinePass();
+void registerTestEmulateNarrowTypePass();
+void registerTestExpandMathPass();
+void registerTestFooAnalysisPass();
+void registerTestComposeSubView();
+void registerTestMultiBuffering();
+void registerTestIRVisitorsPass();
+void registerTestGenericIRVisitorsPass();
+void registerTestInterfaces();
+void registerTestIRVisitorsPass();
+void registerTestLastModifiedPass();
+void registerTestLinalgDecomposeOps();
+void registerTestLinalgDropUnitDims();
+void registerTestLinalgElementwiseFusion();
+void registerTestLinalgGreedyFusion();
+void registerTestLinalgRankReduceContractionOps();
+vo...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/107383


More information about the llvm-commits mailing list