Enabled optimization of complex conjugate at the top level of complex operations.

original commit: fff71e6a1d5746bf30ec7b3d64ec63ccd43f8065
This commit is contained in:
Vincent St-Amour 2010-07-13 12:12:12 -04:00
parent 4e3f1c1e4b
commit f5c518398f
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,3 @@
#lang typed/scheme #:optimize
(require racket/unsafe/ops)
(conjugate (+ 1.0+2.0i 2.0+4.0i))

View File

@ -139,7 +139,8 @@
#:with opt
(begin (log-optimization "unary inexact complex" #'op)
#'(op.unsafe n.opt)))
(pattern (~and exp (#%plain-app (~var op (float-op binary-inexact-complex-ops))
(pattern (~and exp (#%plain-app (~or (~var op (float-op binary-inexact-complex-ops))
(~and op (~literal conjugate)))
e:inexact-complex-expr ...))
#:with exp*:unboxed-inexact-complex-opt-expr #'exp
#:with opt