Clean up complex-call-site a bit.
This commit is contained in:
parent
263e09884e
commit
0b5f947ea3
|
@ -396,7 +396,7 @@
|
||||||
|
|
||||||
(pattern (#%plain-app op:unboxed-fun args:expr ...)
|
(pattern (#%plain-app op:unboxed-fun args:expr ...)
|
||||||
;no need to optimize op
|
;no need to optimize op
|
||||||
#:with (~var || (float-complex-call-site-opt-expr #'op.unboxed-info #'op)) this-syntax
|
#:with (~var || (float-complex-call-site-opt-expr #'op.unboxed-info)) #'(op args ...)
|
||||||
#:do [(log-arity-raising-opt "call to fun with unboxed args")])
|
#:do [(log-arity-raising-opt "call to fun with unboxed args")])
|
||||||
|
|
||||||
(pattern :float-complex-arith-opt-expr))
|
(pattern :float-complex-arith-opt-expr))
|
||||||
|
@ -480,19 +480,19 @@
|
||||||
;; takes as argument a structure describing which arguments will be unboxed
|
;; takes as argument a structure describing which arguments will be unboxed
|
||||||
;; and the optimized version of the operator. operators are optimized elsewhere
|
;; and the optimized version of the operator. operators are optimized elsewhere
|
||||||
;; to benefit from local information
|
;; to benefit from local information
|
||||||
(define-syntax-class (float-complex-call-site-opt-expr unboxed-info opt-operator)
|
(define-syntax-class (float-complex-call-site-opt-expr unboxed-info)
|
||||||
#:commit
|
#:commit
|
||||||
#:attributes (opt)
|
#:attributes (opt)
|
||||||
;; call site of a function with unboxed parameters
|
;; call site of a function with unboxed parameters
|
||||||
;; the calling convention is: real parts of unboxed, imag parts, boxed
|
;; the calling convention is: real parts of unboxed, imag parts, boxed
|
||||||
(pattern (#%plain-app op:expr args:expr ...)
|
(pattern (op:expr args:expr ...)
|
||||||
#:with (unboxed-args ...) unboxed-info
|
#:with (unboxed-args ...) unboxed-info
|
||||||
#:with opt
|
#:with opt
|
||||||
(syntax-parse #'((unboxed-args args) ...)
|
(syntax-parse #'((unboxed-args args) ...)
|
||||||
[(e:possibly-unboxed ...)
|
[(e:possibly-unboxed ...)
|
||||||
(log-unboxing-opt "unboxed call site")
|
(log-unboxing-opt "unboxed call site")
|
||||||
#`(let*-values (e.bindings ... ...)
|
#`(let*-values (e.bindings ... ...)
|
||||||
(#%plain-app #,opt-operator
|
(#%plain-app op
|
||||||
e.real-binding ... ...
|
e.real-binding ... ...
|
||||||
e.imag-binding ... ...
|
e.imag-binding ... ...
|
||||||
e.boxed-binding ... ...))])))
|
e.boxed-binding ... ...))])))
|
||||||
|
|
|
@ -35,7 +35,8 @@
|
||||||
#:with (~var operator (unboxed-let-opt-expr-internal #t)) #'let-e
|
#:with (~var operator (unboxed-let-opt-expr-internal #t)) #'let-e
|
||||||
#:with loop-fun2:unboxed-fun #'loop-fun
|
#:with loop-fun2:unboxed-fun #'loop-fun
|
||||||
#:do [(log-optimization "unboxed let loop" arity-raising-opt-msg #'loop-fun2)]
|
#:do [(log-optimization "unboxed let loop" arity-raising-opt-msg #'loop-fun2)]
|
||||||
#:with (~var || (float-complex-call-site-opt-expr #'loop-fun2.unboxed-info #'operator.opt)) this-syntax))
|
#:with (~var || (float-complex-call-site-opt-expr #'loop-fun2.unboxed-info))
|
||||||
|
#'(operator.opt args ...)))
|
||||||
|
|
||||||
;; does the bulk of the work
|
;; does the bulk of the work
|
||||||
;; detects which let bindings can be unboxed, same for arguments of let-bound
|
;; detects which let bindings can be unboxed, same for arguments of let-bound
|
||||||
|
|
Loading…
Reference in New Issue
Block a user