Make float-complex optimizations be more picky.
This commit is contained in:
parent
0d30866d04
commit
547b57c29e
|
@ -255,6 +255,7 @@
|
|||
(unsafe-fl* c.imag-binding c.imag-binding))))))
|
||||
|
||||
(pattern (#%plain-app op:exp^ c:unboxed-float-complex-opt-expr)
|
||||
#:when (subtypeof? this-syntax -FloatComplex)
|
||||
#:with (real-binding imag-binding) (binding-names)
|
||||
#:with scaling-factor (generate-temporary "unboxed-scaling-")
|
||||
#:do [(log-unboxing-opt "unboxed unary float complex")]
|
||||
|
@ -286,12 +287,14 @@
|
|||
|
||||
;; we can eliminate boxing that was introduced by the user
|
||||
(pattern (#%plain-app op:make-rectangular^ real:float-arg-expr imag:float-arg-expr)
|
||||
#:when (subtypeof? this-syntax -FloatComplex)
|
||||
#:with (real-binding imag-binding) (binding-names)
|
||||
#:do [(log-unboxing-opt "make-rectangular elimination")]
|
||||
#:with (bindings ...)
|
||||
#'(((real-binding) real.opt)
|
||||
((imag-binding) imag.opt)))
|
||||
(pattern (#%plain-app op:make-polar^ r:float-arg-expr theta:float-arg-expr)
|
||||
#:when (subtypeof? this-syntax -FloatComplex)
|
||||
#:with radius (generate-temporary)
|
||||
#:with angle (generate-temporary)
|
||||
#:with (real-binding imag-binding) (binding-names)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#<<END
|
||||
TR opt: complex-exp.rkt 15:0 (- (exp 0) 1.0+2.0i) -- unboxed binary float complex
|
||||
TR opt: complex-exp.rkt 15:11 1.0+2.0i -- unboxed literal
|
||||
TR opt: complex-exp.rkt 15:3 (exp 0) -- unboxed unary float complex
|
||||
TR opt: complex-exp.rkt 15:3 (exp 0) -- float-arg-expr in complex ops
|
||||
TR opt: complex-exp.rkt 15:8 0 -- float-arg-expr in complex ops
|
||||
END
|
||||
#<<END
|
||||
|
|
Loading…
Reference in New Issue
Block a user