[Mlir-commits] [mlir] [mlir][Func] Extract operation-to-function utility from Query (PR #174103)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Wed Jan 7 00:03:27 PST 2026


================
@@ -83,6 +83,19 @@ lookupOrCreateFnDecl(OpBuilder &b, SymbolOpInterface symTable, StringRef name,
                      SymbolTableCollection *symbolTables = nullptr,
                      Type resultType = {});
 
+/// Extract a slice of operations into a new function.
+///
+/// The operations are cloned into a new function body. All operands that are
+/// defined outside the slice become function arguments, and all results from
+/// the operations become function return values. Unused function arguments
+/// are automatically removed.
+///
+/// Note: Operations with regions containing compute payloads are cloned but
+/// the region contents may not be properly handled in all cases.
----------------
ftynse wrote:

Do we know which cases specifically, and why?

https://github.com/llvm/llvm-project/pull/174103


More information about the Mlir-commits mailing list