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
Is there an agreed strategy to test if particular optimizer is working as supposed? Coalton-level functional tests don't cut it, for optimized code should behave functionally equivalent to the unoptimized one.
In my Scheme implementation where Scheme is compiled to VM code, the tests examine the VM instruction sequence (using pattern match) to see if optimizer is working.
In Coalton, we can either (1) examine the generated Lisp code, or (2) extract the rewritten AST and examine it. I prefer looking at AST, for it won't be affected by the changes in the later codegen passes. But test code needs to know the internals of AST.
It may also be convenient to have a general mechanism to turn on/off particular optimizations.
If this has been discussed before, could you point me the reference? Thanks.
The text was updated successfully, but these errors were encountered:
shirok
changed the title
Testing optimizer (and more generally, code generator)
Testing optimizer (and more generally, AST modifier)
Oct 10, 2024
Is there an agreed strategy to test if particular optimizer is working as supposed? Coalton-level functional tests don't cut it, for optimized code should behave functionally equivalent to the unoptimized one.
In my Scheme implementation where Scheme is compiled to VM code, the tests examine the VM instruction sequence (using pattern match) to see if optimizer is working.
In Coalton, we can either (1) examine the generated Lisp code, or (2) extract the rewritten AST and examine it. I prefer looking at AST, for it won't be affected by the changes in the later codegen passes. But test code needs to know the internals of AST.
It may also be convenient to have a general mechanism to turn on/off particular optimizations.
If this has been discussed before, could you point me the reference? Thanks.
The text was updated successfully, but these errors were encountered: