[all-commits] [llvm/llvm-project] ce954e: [mlir][Transforms] GreedyPatternRewriteDriver: Wor...

Matthias Springer via All-commits all-commits at lists.llvm.org
Wed May 31 00:39:02 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ce954e1cda5c9b55325903d51285cd742152a0c3
  Author: Matthias Springer <me at m-sp.org>
  Date:   2023-05-31 (Wed, 31 May 2023)

  Changed paths:
    M mlir/include/mlir/Config/mlir-config.h.cmake
    M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp

  Log Message:
  [mlir][Transforms] GreedyPatternRewriteDriver: Worklist randomizer

Instead of always taking the last op from the worklist, take a random one. For testing/debugging purposes only. This feature can be used to ensure that lowering pipelines work correctly regardless of the order in which ops are processed by the GreedyPatternRewriteDriver.

The randomizer can be enabled by setting a numeric `MLIR_GREEDY_REWRITE_RANDOMIZER_SEED` option.

Note: When enabled, 27 tests are currently failing. Partly because FileCheck tests are looking for exact IR.

Discussion: https://discourse.llvm.org/t/discussion-fuzzing-pattern-application/67911

Differential Revision: https://reviews.llvm.org/D142447

More information about the All-commits mailing list