[all-commits] [llvm/llvm-project] b00e0c: [MLIR][Analysis] Consolidate topological sort util...

Christian Ulmann via All-commits all-commits at lists.llvm.org
Tue May 21 23:48:33 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b00e0c167186d69e1e6bceda57c09b272bd6acfc
      https://github.com/llvm/llvm-project/commit/b00e0c167186d69e1e6bceda57c09b272bd6acfc
  Author: Christian Ulmann <christianulmann at gmail.com>
  Date:   2024-05-22 (Wed, 22 May 2024)

  Changed paths:
    M mlir/include/mlir/Analysis/SliceAnalysis.h
    A mlir/include/mlir/Analysis/TopologicalSortUtils.h
    M mlir/include/mlir/Transforms/RegionUtils.h
    R mlir/include/mlir/Transforms/TopologicalSortUtils.h
    M mlir/lib/Analysis/CMakeLists.txt
    M mlir/lib/Analysis/SliceAnalysis.cpp
    A mlir/lib/Analysis/TopologicalSortUtils.cpp
    M mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp
    M mlir/lib/Dialect/Affine/Utils/LoopFusionUtils.cpp
    M mlir/lib/Dialect/ArmSME/Transforms/TileAllocation.cpp
    M mlir/lib/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.cpp
    M mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/lib/Transforms/Mem2Reg.cpp
    M mlir/lib/Transforms/SROA.cpp
    M mlir/lib/Transforms/TopologicalSort.cpp
    M mlir/lib/Transforms/Utils/CMakeLists.txt
    M mlir/lib/Transforms/Utils/RegionUtils.cpp
    R mlir/lib/Transforms/Utils/TopologicalSortUtils.cpp
    M mlir/lib/Transforms/ViewOpGraph.cpp
    M mlir/test/Analysis/test-topoligical-sort.mlir
    A mlir/test/Analysis/test-toposort.mlir
    M mlir/test/Dialect/Affine/slicing-utils.mlir
    R mlir/test/Transforms/test-toposort.mlir
    M mlir/test/lib/Analysis/CMakeLists.txt
    M mlir/test/lib/Analysis/TestSlice.cpp
    A mlir/test/lib/Analysis/TestTopologicalSort.cpp
    M mlir/test/lib/Transforms/CMakeLists.txt
    R mlir/test/lib/Transforms/TestTopologicalSort.cpp
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

  Log Message:
  -----------
  [MLIR][Analysis] Consolidate topological sort utilities  (#92563)

This PR attempts to consolidate the different topological sort utilities
into one place. It adds them to the analysis folder because the
`SliceAnalysis` uses some of these.

There are now two different sorting strategies: 
1. Sort only according to SSA use-def chains
2. Sort while taking regions into account. This requires a much more
elaborate traversal and cannot be applied on graph regions that easily.

This additionally reimplements the region aware topological sorting
because the previous implementation had an exponential space complexity.

I'm open to suggestions on how to combine this further or how to fuse
the test passes.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list