[Mlir-commits] [mlir] [MLIR][Transform] Prefer entry points in current module (PR #151323)
Jakub Kuderski
llvmlistbot at llvm.org
Thu Jul 31 07:17:58 PDT 2025
================
@@ -121,23 +121,94 @@ ModuleOp transform::detail::getPreloadedTransformModule(MLIRContext *context) {
->getLibraryModule();
}
+namespace {
+
+transform::TransformOpInterface
+findTransformEntryPointNonRecursive(Operation *op, StringRef entryPoint) {
+ for (Region ®ion : op->getRegions()) {
+ for (Block &block : region.getBlocks()) {
+ auto namedSequenceOps = block.getOps<transform::NamedSequenceOp>();
+ for (transform::NamedSequenceOp namedSequenceOp : namedSequenceOps) {
+ if (namedSequenceOp.getSymName() == entryPoint) {
+ return cast<transform::TransformOpInterface>(
+ namedSequenceOp.getOperation());
+ }
+ }
+ }
+ }
+ return nullptr;
+}
+
+transform::TransformOpInterface
----------------
kuhar wrote:
```suggestion
static transform::TransformOpInterface
```
https://github.com/llvm/llvm-project/pull/151323
More information about the Mlir-commits
mailing list