You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SCF interpreter is still a bit buggy. Trying to switch to scf to see
what break here.
UPDATE: Ok I see the problem here, we cannot take the similar route as
xDSL because they don't aim to deal with python semantics. It works if
we follow MLIR convention, but if we have to support Python. We need to
allow `scf.IfElse` statement accept other terminators, e.g
`func.Return`, I don't see an easy way transforming to `Yield` in this
case because we are doing more dynamic semantics (e.g the return value
can be a union of different sized tuple), making the following code
seems not possible to have an `yield` equivalent form
```mlir
%1, %2 = scf.if a > b {
func.return a
} else {
y = b + 1
scf.yield a,y
}
```
we cannot lift the `return` statement outside the if statement here...
so directly supporting this would require `run_ssacfg_region` to forward
the `ReturnValue` result until we pop the current function frame.
0 commit comments