bril
bril copied to clipboard
[SSA] Swap problem test is not in SSA form
The test for the swap problem is not in SSA form. In particular, i is reassigned:
https://github.com/sampsyo/bril/blob/175580e85cb6e4f78e82cdc8c26bfacfb0ef6c22/examples/test/from_ssa/swap-problem.bril#L2
https://github.com/sampsyo/bril/blob/175580e85cb6e4f78e82cdc8c26bfacfb0ef6c22/examples/test/from_ssa/swap-problem.bril#L19
If this is not supposed to be in SSA form, I can close the issue. Otherwise, it's a pretty trivial fix.
Similarly, the dead-set.bril is not in SSA either, and turning it into SSA seems to defeat the point of the test?
Hi! Thanks for pointing this out.
- For
swap-problem.bril, yeah, it's not really critical for this to be in SSA form to demonstrate the problem, but I guess it would be nice. Any chance you would mind applying the trivial fix? - For
dead-set.bril, I think it's a similar story: it's not really required for this to be fully in SSA form to test what it's trying to test (which are the semantics ofgetandset, in the context of any program). But for neatness, we could make it SSA by just removing thegetaltogether in that file? Would that make sense? I think it would still test what I was hoping to test (i.e., thatsetdoes not actually affect the "real" state of thexvariable).
I see. I assumed it wasn't critical; I just caught it because my out-of-SSA pass first assert!s that the program is indeed in SSA.