[llvm-branch-commits] [mlir] [mlir][Interfaces] Add generic pattern for region inlining (PR #176641)
Matthias Springer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jan 21 00:51:42 PST 2026
================
@@ -320,6 +320,45 @@ Region *getEnclosingRepetitiveRegion(Value value);
void populateRegionBranchOpInterfaceCanonicalizationPatterns(
RewritePatternSet &patterns, StringRef opName, PatternBenefit benefit = 1);
+/// Helper function for the region branch op inlining pattern that builds
+/// replacement values for non-successor-input values.
+using NonSuccessorInputReplacementBuilderFn =
+ std::function<Value(OpBuilder &, Location, Value)>;
+/// Helper function for the region branch op inlining pattern that checks if the
+/// pattern is applicable to the given operation.
+using PatternMatcherFn = std::function<LogicalResult(Operation *)>;
----------------
matthias-springer wrote:
Note: This is required because some ops (`scf.execute_region`) have a "no_inline" attribute.
https://github.com/llvm/llvm-project/pull/176641
More information about the llvm-branch-commits
mailing list