Andy Wingo
c119623e45
Simplify $branch to always take a $primcall
...
* module/language/tree-il/compile-cps.scm (convert): Lower (if foo A B)
to (if (false? foo) B A).
* module/language/cps/specialize-numbers.scm:
* module/language/cps/closure-conversion.scm:
* module/language/cps/contification.scm:
* module/language/cps/cse.scm:
* module/language/cps/dce.scm:
* module/language/cps/peel-loops.scm:
* module/language/cps/rotate-loops.scm:
* module/language/cps/self-references.scm:
* module/language/cps/simplify.scm:
* module/language/cps/slot-allocation.scm:
* module/language/cps/split-rec.scm:
* module/language/cps/type-fold.scm:
* module/language/cps/types.scm:
* module/language/cps/verify.scm: Adapt.
* module/language/cps/compile-bytecode.scm: Add support for new-style
false? instruction for false? primcall.
2017-10-29 10:05:24 +01:00
Andy Wingo
8da33d972a
Fix compilation of continue' in
while'.
...
* module/language/cps/rotate-loops.scm (rotate-loops-in-function): Don't
attempt to rotate a loop whose header is a $prompt. Fixes use of
`continue' in `while'. Thanks to Nala Ginrut for the report :)
2016-08-04 21:36:34 +02:00
Andy Wingo
ce2888701c
Simplify rotate-loops.scm
...
* module/language/cps/rotate-loops.scm: Clean up unused code.
2015-07-27 12:59:09 +02:00
Andy Wingo
e54fbff185
Loop inversion with multiple exits
...
* module/language/cps/rotate-loops.scm (rotate-loop): Instead of
restricting rotation to loops with just one exit node, restrict to
loops with just one exit successor.
2015-07-25 11:03:59 +02:00
Andy Wingo
ee85e2969f
Rotate comparisons down to loop back-edges
...
* module/language/cps/rotate-loops.scm: New pass.
* module/Makefile.am:
* module/language/cps/optimize.scm: Wire up the new pass.
2015-07-24 16:51:04 +02:00