Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion mlir/lib/Transforms/CompositePass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ struct CompositeFixedPointPass final
populateFunc(dynamicPM);

llvm::raw_string_ostream os(pipelineStr);
dynamicPM.printAsTextualPipeline(os);
llvm::interleave(
dynamicPM, [&](mlir::Pass &pass) { pass.printAsTextualPipeline(os); },
[&]() { os << ","; });
}

LogicalResult initializeOptions(
Expand Down
6 changes: 5 additions & 1 deletion mlir/test/Transforms/composite-pass.mlir
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// RUN: mlir-opt %s --log-actions-to=- --test-composite-fixed-point-pass -split-input-file | FileCheck %s
// RUN: mlir-opt %s --log-actions-to=- --test-composite-fixed-point-pass -split-input-file --dump-pass-pipeline 2>&1 | FileCheck %s --check-prefixes=CHECK,PIPELINE
// RUN: mlir-opt %s --log-actions-to=- --composite-fixed-point-pass='name=TestCompositePass pipeline=any(canonicalize,cse)' -split-input-file | FileCheck %s

// Ensure the composite pass correctly prints its options.
// PIPELINE: builtin.module(composite-fixed-point-pass{max-iterations=10 name=TestCompositePass
// PIPELINE-SAME: pipeline=canonicalize{ max-iterations=10 max-num-rewrites=-1 region-simplify=normal test-convergence=false top-down=true},cse})

// CHECK-LABEL: running `TestCompositePass`
// CHECK: running `Canonicalizer`
// CHECK: running `CSE`
Expand Down