mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-11 19:53:52 -08:00
Warn about automatic boxing of SSE values in the compiler.
Since the whole point of SSE is high performance, boxing defeats the purpose and should be immediately flagged. Also enable marking functions so that the compiler warns if they are not inlined.
This commit is contained in:
parent
5088dd10b5
commit
dcf08cd6c0
3 changed files with 14 additions and 1 deletions
|
|
@ -102,6 +102,11 @@
|
|||
(let ((other (inline-type-matches x types return-type)))
|
||||
(when other
|
||||
(setf output (choose-inline-info output other return-type return-rep-type)))))
|
||||
(when (and (null output)
|
||||
(get-sysprop fname 'should-be-inlined)
|
||||
(>= (cmp-env-optimization 'speed) 1))
|
||||
(cmpwarn-style "Could not inline call to ~S ~S - performance may be degraded."
|
||||
fname types))
|
||||
output))
|
||||
|
||||
(defun to-fixnum-float-type (type)
|
||||
|
|
|
|||
|
|
@ -326,6 +326,12 @@
|
|||
(otherwise
|
||||
(coercion-error))))
|
||||
((:object)
|
||||
#+sse2
|
||||
(case loc-rep-type
|
||||
((:int-sse-pack :float-sse-pack :double-sse-pack)
|
||||
(when (>= (cmp-env-optimization 'speed) 1)
|
||||
(cmpwarn-style "Boxing a value of type ~S - performance degraded."
|
||||
loc-rep-type))))
|
||||
(wt-to-object-conversion loc-rep-type loc))
|
||||
((:pointer-void)
|
||||
(case loc-rep-type
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
(in-package "COMPILER")
|
||||
|
||||
(defun def-inline (name safety arg-types return-rep-type expansion
|
||||
&key (one-liner t) (exact-return-type nil)
|
||||
&key (one-liner t) (exact-return-type nil) (inline-or-warn nil)
|
||||
&aux arg-rep-types)
|
||||
(setf safety
|
||||
(case safety
|
||||
|
|
@ -36,6 +36,8 @@
|
|||
arg-types))
|
||||
(when (eq return-rep-type t)
|
||||
(setf return-rep-type :object))
|
||||
(when inline-or-warn
|
||||
(put-sysprop name 'should-be-inlined t))
|
||||
(let* ((return-type (if (and (consp return-rep-type)
|
||||
(eq (first return-rep-type) 'values))
|
||||
t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue