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
It's tempting to try to do early lowering on this, where we would early on rewrite set_variable('x', 'foo') to x = 'foo', but I highly doubt that's useful. that's a case where someone can just write x = 'foo', and not get into the weeds of set_variable. Even in the case above, it's rather simple to handle this via loop unrolling. The real concern I have, is that we may not always be aware of what x is, and thus have invalid global value numbering, and perhaps even have invalid optimization of the program. This is more complicated when the value is also a variable, such as set_variable(x, y)
unset_variable
This will require better tracking of variables declared in blocks, since the biggest side effect of this is that we need to make sure that versions of variables that are undefined don't propagate across block boundaries. That probably means that we should move variable version tracking to either the cfg node or the block
The text was updated successfully, but these errors were encountered:
set_variable
We have the problem that you can use
set_variable
to set a variable by a variable. consider:It's tempting to try to do early lowering on this, where we would early on rewrite
set_variable('x', 'foo')
tox = 'foo'
, but I highly doubt that's useful. that's a case where someone can just writex = 'foo'
, and not get into the weeds ofset_variable
. Even in the case above, it's rather simple to handle this via loop unrolling. The real concern I have, is that we may not always be aware of whatx
is, and thus have invalid global value numbering, and perhaps even have invalid optimization of the program. This is more complicated when the value is also a variable, such asset_variable(x, y)
unset_variable
This will require better tracking of variables declared in blocks, since the biggest side effect of this is that we need to make sure that versions of variables that are undefined don't propagate across block boundaries. That probably means that we should move variable version tracking to either the cfg node or the block
The text was updated successfully, but these errors were encountered: