Commit graph

2 commits

Author SHA1 Message Date
Leonardo de Moura
fd25827d3e fix(library/init/lean/compiler/ir/resetreuse): must use livevars instead of freevars
The file badreset contains two functions where the new `reset/reuse`
insertion procedure implemented in Lean produces better results than the
one implemented in C++.

cc @kha
2019-05-07 11:09:51 -07:00
Leonardo de Moura
cae5ee075e test(tests/playground/badreset): add test that exposes a bad reset/reuse placement
The generated code is safe, but the `reset/reuse` optimization will
never be applicable at runtime. The issue is that
`insert_reset_reuse_fn` is not checking the joint points.
I will fix the bug only at `resetreuse.lean`.
2019-05-03 17:13:29 -07:00