[all-commits] [llvm/llvm-project] fb1de7: Implement a new kind of Pass: dynamic pass pipeline

Mehdi Amini via All-commits all-commits at lists.llvm.org
Tue Sep 22 11:52:19 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: fb1de7ed921c3c1531c0cb28b9603af22ecd0529
      https://github.com/llvm/llvm-project/commit/fb1de7ed921c3c1531c0cb28b9603af22ecd0529
  Author: Mehdi Amini <joker.eph at gmail.com>
  Date:   2020-09-22 (Tue, 22 Sep 2020)

  Changed paths:
    M mlir/include/mlir/Pass/Pass.h
    M mlir/include/mlir/Pass/PassManager.h
    M mlir/lib/Pass/Pass.cpp
    A mlir/test/Pass/dynamic-pipeline-fail-on-parent.mlir
    A mlir/test/Pass/dynamic-pipeline-nested.mlir
    A mlir/test/Pass/dynamic-pipeline.mlir
    M mlir/test/lib/Transforms/CMakeLists.txt
    A mlir/test/lib/Transforms/TestDynamicPipeline.cpp
    M mlir/tools/mlir-opt/mlir-opt.cpp

  Log Message:
  -----------
  Implement a new kind of Pass: dynamic pass pipeline

Instead of performing a transformation, such pass yields a new pass pipeline
to run on the currently visited operation.
This feature can be used for example to implement a sub-pipeline that
would run only on an operation with specific attributes. Another example
would be to compute a cost model and dynamic schedule a pipeline based
on the result of this analysis.

Discussion: https://llvm.discourse.group/t/rfc-dynamic-pass-pipeline/1637

Recommit after fixing an ASAN issue: the callback lambda needs to be
allocated to a temporary to have its lifetime extended to the end of the
current block instead of just the current call expression.

Reviewed By: silvas

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




More information about the All-commits mailing list