This PR fixes the two recently added passes from #68661, which were non-functional and untested. In particular: * The passes did not declare their dependent dialects, so they could not run at all in the most simple cases. * The mechanism of loading the library module in the initialization of the intepreter pass is broken by design (but, fortunately, also not necessary). This is because the initialization of all passes happens before the execution of any other pass, so the "preload library" pass has not run yet at the time the interpreter pass gets initialized. Instead, the library is now loaded every time the interpreter pass is run. This should not be exceedingly expensive, since it only consists of looking up the library in the dialect. Also, this removes the library module from the pass state, making it possible in the future to preload libraries in several passes. * The PR adds tests for the two passes, which were completely untested previously.
18 lines
590 B
MLIR
18 lines
590 B
MLIR
// RUN: mlir-opt %s -transform-interpreter \
|
|
// RUN: -split-input-file -verify-diagnostics
|
|
|
|
module attributes { transform.with_named_sequence } {
|
|
transform.named_sequence @__transform_main(!transform.any_op {transform.readonly}) {
|
|
^bb0(%arg0: !transform.any_op):
|
|
// expected-remark @below {{applying transformation}}
|
|
transform.test_transform_op
|
|
transform.yield
|
|
}
|
|
|
|
transform.named_sequence @entry_point(!transform.any_op {transform.readonly}) {
|
|
^bb0(%arg0: !transform.any_op):
|
|
transform.test_transform_op // Note: does not yield remark.
|
|
transform.yield
|
|
}
|
|
}
|