Skip to content

Commit fa99aa8

Browse files
committed
Debug prints for RaiseTolinalg and 2. SelectFunc pass to process just a given function
1 parent 3b56eb3 commit fa99aa8

File tree

5 files changed

+295
-10
lines changed

5 files changed

+295
-10
lines changed

include/polygeist/Passes/Passes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class PatternRewriter;
2222
class RewritePatternSet;
2323
class DominanceInfo;
2424
namespace polygeist {
25+
std::unique_ptr<Pass> createSelectFuncPass();
2526
std::unique_ptr<Pass> createParallelLICMPass();
2627
std::unique_ptr<Pass> createPolygeistMem2RegPass();
2728
std::unique_ptr<Pass> createLoopRestructurePass();

include/polygeist/Passes/Passes.td

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@
44
include "mlir/Pass/PassBase.td"
55
include "mlir/Rewrite/PassUtil.td"
66

7+
def SelectFunc : Pass<"select-func"> {
8+
let summary = "Run a pass pipeline on selected functions by name";
9+
let constructor = "mlir::polygeist::createSelectFuncPass()";
10+
let options = [
11+
Option<"pipeline", "pipeline", "std::string", /*default=*/"\"\"",
12+
"The pass pipeline to run on filtered functions">,
13+
ListOption<"funcNames", "func-name", "std::string",
14+
"Function names to process (if empty, process all)">
15+
];
16+
}
17+
718
def AffineCFG : Pass<"affine-cfg"> {
819
let summary = "Replace scf.if and similar with affine.if";
920
let constructor = "mlir::polygeist::replaceAffineCFGPass()";

lib/polygeist/Passes/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
add_mlir_dialect_library(MLIRPolygeistTransforms
22
ConvertToOpaquePtr.cpp
3+
SelectFunc.cpp
34
AffineCFG.cpp
45
AffineReduction.cpp
56
CanonicalizeFor.cpp

0 commit comments

Comments
 (0)