‘scope’ Dialect Passes¶
-inline-scope¶
Inline scope region within ScopeOp.
Move out operations inside the scope region to its parent
region if scope.scope doesn’t have the no_inline attribute.
Example:
func.func @test() {
scope.scope : () -> () {
...
scope.return
} {no_inline}
scope.scope : () -> () {
<inlinable_operations>
scope.return
}
return
}
will be transformed into:
func.func @test() {
scope.scope : () -> () {
...
scope.return
} {no_inline}
<inlinable_operations>
return
}
Options¶
-force-inline : Inline scope regardless of `no_inline` attribute.
-outline-scope¶
Outline scope region within ScopeOp.
Convert scope.scope into a func.func.
Example:
module {
func.func @test() {
scope.scope : () -> () {
...
scope.return
} {tcore_type = #hivm.tcore_type<CUBE>, ...}
scope.scope : () -> () {
...
scope.return
} {tcore_type = #hivm.tcore_type<VECTOR>, ...}
return
}
}
will be transformed into:
module {
func.func @test_scope_0() attributes {tcore_type = #hivm.tcore_type<CUBE>, ...} {
...
return
}
func.func @test_scope_1() attributes {tcore_type = #hivm.tcore_type<VECTOR>, ...} {
...
return
}
func.func @test() {
call @test_scope_scope_scope_0() : () -> ()
call @test_scope_scope_scope_1() : () -> ()
return
}
}