[Mlir-commits] [mlir] [mlir][scf][transform] Add scope op & transform (PR #87352)
Gil Rapaport
llvmlistbot at llvm.org
Mon Apr 8 06:22:31 PDT 2024
================
@@ -931,6 +931,28 @@ def ReduceReturnOp :
let hasVerifier = 1;
}
+def ScopeOp : SCF_Op<"scope",
+ [AutomaticAllocationScope,
+ RecursiveMemoryEffects,
+ IsolatedFromAbove,
+ SingleBlockImplicitTerminator<"scf::YieldOp">]> {
+ let summary = "isolated code scope";
+ let description = [{
+ This op models an executed-once region, similar to `execute_region`
+ except it's isolated from above, which facilitates local scoping of
+ code without resorting to function outlining.
----------------
aniragil wrote:
Would be great to unify them, but can we make the isolated-from-above trait behave dynamically based on an attribute?
https://github.com/llvm/llvm-project/pull/87352
More information about the Mlir-commits
mailing list