[Mlir-commits] [mlir] [mlir][scf][transform] Add scope op & transform (PR #87352)
Mehdi Amini
llvmlistbot at llvm.org
Mon Apr 8 06:27:11 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.
----------------
joker-eph wrote:
I don't understand the description, and this the motivation for adding this operation right now, can you elaborate?
Also please split the Pr in two: introduce the op to SCF is orthogonal to the Transform dialect.
https://github.com/llvm/llvm-project/pull/87352
More information about the Mlir-commits
mailing list