added a parameter to switch between different letrec handling routines

This commit is contained in:
Abdulaziz Ghuloum 2009-07-06 12:07:18 +03:00
parent 832fe616d2
commit cda06eba58
4 changed files with 19 additions and 7 deletions

View File

@ -1,6 +1,6 @@
(module (debug-scc optimize-letrec)
(module (debug-scc optimize-letrec current-letrec-pass)
(define (unique-prelex x)
@ -468,10 +468,20 @@
(define debug-scc (make-parameter #f))
(define current-letrec-pass
(make-parameter optimize-letrec/scc))
(make-parameter 'scc
(lambda (x)
(if (memq x '(scc waddell basic))
x
(die 'current-letrec-pass "invalid" x)))))
(define (optimize-letrec x)
((current-letrec-pass) x)))
(case (current-letrec-pass)
[(scc) (optimize-letrec/scc x)]
[(waddell) (optimize-letrec/waddell x)]
[(basic) (optimize-letrec/basic x)]
[else (die 'optimize-letrec "invalid" (current-letrec-pass))]))
)

View File

@ -22,7 +22,7 @@
expand expand/optimize expand/scc-letrec optimizer-output
cp0-effort-limit cp0-size-limit optimize-level
perform-tag-analysis tag-analysis-output
strip-source-info generate-debug-calls)
strip-source-info generate-debug-calls current-letrec-pass)
(import
(rnrs hashtables)
(ikarus system $fx)
@ -37,7 +37,7 @@
cp0-size-limit cp0-effort-limit
expand/optimize expand/scc-letrec expand optimizer-output
tag-analysis-output perform-tag-analysis
current-core-eval)
current-core-eval current-letrec-pass)
(ikarus include)
(ikarus.fasl.write)
(ikarus.intel-assembler))

View File

@ -1 +1 @@
1823
1824

View File

@ -17,6 +17,7 @@
;;; vim:syntax=scheme
(import (only (ikarus) import))
(import (except (ikarus)
current-letrec-pass
current-core-eval
assembler-output optimize-cp optimize-level
cp0-size-limit cp0-effort-limit expand/optimize
@ -1502,6 +1503,7 @@
[cp0-effort-limit i]
[tag-analysis-output i]
[perform-tag-analysis i]
[current-letrec-pass i]
[pointer? $for]
[pointer->integer $for]
[integer->pointer $for]