Skip to content

Commit 61536e4

Browse files
authored
[tpp-sched] Make passes which operate on modules operate on modules (#1051)
There was no reason for these passes to only get access to the contained func.funcs. In case of `-convert-cf-to-llvm` (#1050) it led to the incorrect behaviour. This corresponds to what is happening in `DefaultPipeline.cpp`. Also fixes typo "convert-omp-to-llvm" -> "convert-openmp-to-llvm".
1 parent a05036d commit 61536e4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

python/mlir/tpp/sched/bundles.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,10 +340,9 @@ def default_pipeline(
340340
mod = apply_registered_pass(mod, "convert-func-to-llvm")
341341
mod = apply_registered_pass(mod, "convert-arith-to-llvm")
342342
mod = apply_registered_pass(mod, "convert-cf-to-llvm")
343-
func = match(mod, ops={"func.func"})
344343
if def_parallel:
345-
func = apply_registered_pass(func, "convert-omp-to-llvm")
346-
func = apply_registered_pass(func, "convert-ub-to-llvm")
344+
mod = apply_registered_pass(mod, "convert-openmp-to-llvm")
345+
mod = apply_registered_pass(mod, "convert-ub-to-llvm")
347346
mod = apply_registered_pass(mod, "canonicalize")
348347
mod = apply_registered_pass(mod, "cse")
349348
mod = apply_registered_pass(mod, "reconcile-unrealized-casts")

0 commit comments

Comments
 (0)