diff options
author | Andy Wingo <wingo@pobox.com> | 2017-11-30 16:58:58 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2017-11-30 16:58:58 +0100 |
commit | 5675e46410c9a24b05ddf58cbe3b998a4c9cad7c (patch) | |
tree | a72efb2a4726c90d212d00a1c62cc3f1a19f8616 /module/language/cps/compile-bytecode.scm | |
parent | 2ab89102e7c82d114c0ac0ecd2a5d806637fdaab (diff) | |
download | guile-5675e46410c9a24b05ddf58cbe3b998a4c9cad7c.tar.gz |
-O1 disables call precoloring
* module/language/cps/compile-bytecode.scm (compile-function)
(emit-bytecode):
* module/language/cps/slot-allocation.scm (allocate-slots):
* module/language/cps/optimize.scm (cps-default-optimization-options):
Allow the "lazy vars" optimization, a form of slot precoloring, to be
disabled. It will be disabled at -O0 or -O1, to speed compilation
times.
Diffstat (limited to 'module/language/cps/compile-bytecode.scm')
-rw-r--r-- | module/language/cps/compile-bytecode.scm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/module/language/cps/compile-bytecode.scm b/module/language/cps/compile-bytecode.scm index 839313870..f7c8fbb5e 100644 --- a/module/language/cps/compile-bytecode.scm +++ b/module/language/cps/compile-bytecode.scm @@ -81,8 +81,9 @@ (_ forwarding-labels))) cps empty-intmap))) -(define (compile-function cps asm) - (let* ((allocation (allocate-slots cps)) +(define (compile-function cps asm opts) + (let* ((allocation (allocate-slots cps #:precolor-calls? + (kw-arg-ref opts #:precolor-calls? #t))) (forwarding-labels (compute-forwarding-labels cps allocation)) (frame-size (lookup-nlocals allocation))) (define (forward-label k) @@ -600,7 +601,7 @@ (define (emit-bytecode exp env opts) (let ((asm (make-assembler))) (intmap-for-each (lambda (kfun body) - (compile-function (intmap-select exp body) asm)) + (compile-function (intmap-select exp body) asm opts)) (compute-reachable-functions exp 0)) (values (link-assembly asm #:page-aligned? (kw-arg-ref opts #:to-file? #f)) env |