guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 21/21: Scalar replacement for f64->scm


From: Andy Wingo
Subject: [Guile-commits] 21/21: Scalar replacement for f64->scm
Date: Wed, 28 Oct 2015 22:31:22 +0000

wingo pushed a commit to branch wip-2.1.2
in repository guile.

commit b5b672165ebc2a638bcb1b048c40990ab1ef1461
Author: Andy Wingo <address@hidden>
Date:   Wed Oct 28 22:27:46 2015 +0000

    Scalar replacement for f64->scm
    
    * module/language/cps/cse.scm (compute-equivalent-subexpressions):
      Scalar replacement for float boxes.
---
 module/language/cps/cse.scm |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/module/language/cps/cse.scm b/module/language/cps/cse.scm
index 894f779..2e47f37 100644
--- a/module/language/cps/cse.scm
+++ b/module/language/cps/cse.scm
@@ -299,6 +299,14 @@ false.  It could be that both true and false proofs are 
available."
              (add-def! `(primcall struct-ref ,struct ,n) val))
             (('primcall 'struct-set!/immediate struct n val)
              (add-def! `(primcall struct-ref/immediate ,struct ,n) val))
+            (('primcall 'scm->f64 scm)
+             (match defs
+               ((f64)
+                (add-def! `(primcall f64->scm ,f64) scm))))
+            (('primcall 'f64->scm f64)
+             (match defs
+               ((scm)
+                (add-def! `(primcall scm->f64 ,scm) f64))))
             (_ #t))))
 
       (define (visit-label label equiv-labels var-substs)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]