mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-09 23:16:41 -04:00
Remove combination-implementation-style.
This commit is contained in:
parent
9ed74fa10a
commit
564aef8890
|
|
@ -195,31 +195,6 @@ To do this, extend ALLOCATE-VECTOR with ALLOW-JUNK argument, and when
|
|||
stack allocating don't zero if it is true -- and probably ALLOW-JUNK iff
|
||||
the vector is a specialized one (cannot have pointers.)
|
||||
--------------------------------------------------------------------------------
|
||||
#29
|
||||
Python is overly zealous when converting high-level CL functions, such
|
||||
as MIN/MAX, LOGBITP, and LOGTEST, to low-level CL functions. Reducing
|
||||
Python's aggressiveness would make it easier to effect changes such as
|
||||
|
||||
x86-64:
|
||||
* direct MIN/MAX on {SINGLE,DOUBLE}-FLOATs ({MIN,MAX}S{S,D})
|
||||
|
||||
x86-64:
|
||||
* direct LOGBITP on word-sized integers and fixnums (BT + JC)
|
||||
|
||||
x86{,-64}/PPC:
|
||||
* branch-free MIN/MAX on word-sized integers and fixnums (floats could
|
||||
be handled too, modulo safety considerations on the PPC)
|
||||
|
||||
x86-64:
|
||||
* efficient LOGTESTs on word-sized integers and fixnums (TEST)
|
||||
|
||||
etc., etc.
|
||||
|
||||
(The framework for this has been implemented as of 0.9.9.18; see the
|
||||
vm-support-routine COMBINATION-IMPLEMENTATION-STYLE and its use in
|
||||
src/compiler/ir1opt.lisp, IR1-OPTIMIZE-COMBINATION. The above
|
||||
optimizations are left as an exercise for the reader.)
|
||||
--------------------------------------------------------------------------------
|
||||
#31
|
||||
The typecheck generated for a declaration like (integer 0 45) on x86 looks
|
||||
like:
|
||||
|
|
|
|||
|
|
@ -1448,7 +1448,6 @@ like *STACK-TOP-HINT* and unsupported stuff like *TRACED-FUN-LIST*.")
|
|||
"CHANGE-VOP-FLAGS" "CONDITIONAL-FLAGS-FLAGS"
|
||||
"IMMEDIATE-CONSTANT-SC"
|
||||
"BOXED-IMMEDIATE-SC-P"
|
||||
"COMBINATION-IMPLEMENTATION-STYLE"
|
||||
"CONVERT-CONDITIONAL-MOVE-P"
|
||||
"LOCATION-PRINT-NAME"
|
||||
"MAKE-CALL-OUT-TNS"
|
||||
|
|
|
|||
|
|
@ -285,10 +285,6 @@
|
|||
(immediate-constant "Immed")
|
||||
(float-registers (format nil "F~D" offset)))))
|
||||
|
||||
(defun combination-implementation-style (node)
|
||||
(declare (ignore node))
|
||||
(values :default nil))
|
||||
|
||||
(defun primitive-type-indirect-cell-type (ptype)
|
||||
(declare (ignore ptype))
|
||||
nil)
|
||||
|
|
|
|||
|
|
@ -314,9 +314,6 @@
|
|||
((double-reg complex-single-reg) "D")
|
||||
(complex-double-reg "Q"))
|
||||
offset)))))
|
||||
(defun combination-implementation-style (node)
|
||||
(declare (ignore node))
|
||||
(values :default nil))
|
||||
|
||||
(defun primitive-type-indirect-cell-type (ptype)
|
||||
(declare (ignore ptype))
|
||||
|
|
|
|||
|
|
@ -93,7 +93,6 @@
|
|||
;;; from vm.lisp
|
||||
;;; immediate-constant-sc
|
||||
;;; location-print-name
|
||||
;;; combination-implementation-style
|
||||
;;; convert-conditional-move-p
|
||||
;;; boxed-immediate-sc-p
|
||||
|
||||
|
|
|
|||
|
|
@ -1200,27 +1200,18 @@
|
|||
|
||||
(let ((optimizer (fun-info-optimizer info)))
|
||||
(unless (and optimizer (funcall optimizer node))
|
||||
;; First give the VM a peek at the call
|
||||
(multiple-value-bind (style)
|
||||
(combination-implementation-style node)
|
||||
(ecase style
|
||||
(:direct
|
||||
;; The VM knows how to handle this.
|
||||
)
|
||||
((:default :maybe)
|
||||
;; Let transforms have a crack at it.
|
||||
(dolist (x (fun-info-transforms info))
|
||||
(when (eq show :all)
|
||||
(let* ((lvar (basic-combination-fun node))
|
||||
(fname (lvar-fun-name lvar t)))
|
||||
(format *trace-output*
|
||||
"~&trying transform ~s for ~s"
|
||||
(transform-type x) fname)))
|
||||
(unless (ir1-transform node x show)
|
||||
(when (eq show :all)
|
||||
(format *trace-output*
|
||||
"~&quitting because IR1-TRANSFORM result was NIL"))
|
||||
(return)))))))))))))
|
||||
(dolist (x (fun-info-transforms info))
|
||||
(when (eq show :all)
|
||||
(let* ((lvar (basic-combination-fun node))
|
||||
(fname (lvar-fun-name lvar t)))
|
||||
(format *trace-output*
|
||||
"~&trying transform ~s for ~s"
|
||||
(transform-type x) fname)))
|
||||
(unless (ir1-transform node x show)
|
||||
(when (eq show :all)
|
||||
(format *trace-output*
|
||||
"~&quitting because IR1-TRANSFORM result was NIL"))
|
||||
(return))))))))))
|
||||
(values))
|
||||
|
||||
(defun xep-tail-combination-p (node)
|
||||
|
|
|
|||
|
|
@ -365,10 +365,6 @@
|
|||
(constant (format nil "Const~D" offset))
|
||||
(immediate-constant "Immed"))))
|
||||
|
||||
(defun combination-implementation-style (node)
|
||||
(declare (type sb-c::combination node) (ignore node))
|
||||
(values :default nil))
|
||||
|
||||
(defun primitive-type-indirect-cell-type (ptype)
|
||||
(declare (ignore ptype))
|
||||
nil)
|
||||
|
|
|
|||
|
|
@ -869,9 +869,6 @@
|
|||
(((constant-arg (mod #.n-word-bits)) word) *)) * :vop t)
|
||||
t)
|
||||
|
||||
;;; We only handle the constant cases because those are the only ones
|
||||
;;; guaranteed to make it past COMBINATION-IMPLEMENTATION-STYLE.
|
||||
;;; --njf, 06-02-2006
|
||||
(define-vop (fast-logbitp-c/fixnum fast-conditional-c/fixnum)
|
||||
(:translate logbitp)
|
||||
(:arg-types (:constant (integer 0 29)) tagged-num)
|
||||
|
|
|
|||
|
|
@ -335,10 +335,6 @@
|
|||
(constant (format nil "Const~D" offset))
|
||||
(immediate-constant "Immed"))))
|
||||
|
||||
(defun combination-implementation-style (node)
|
||||
(declare (ignore node))
|
||||
(values :default nil))
|
||||
|
||||
(defun primitive-type-indirect-cell-type (ptype)
|
||||
(declare (ignore ptype))
|
||||
nil)
|
||||
|
|
|
|||
|
|
@ -696,9 +696,6 @@
|
|||
(((constant-arg (mod #.n-word-bits)) word) *)) * :vop t)
|
||||
t)
|
||||
|
||||
;;; We only handle the constant cases because those are the only ones
|
||||
;;; guaranteed to make it past COMBINATION-IMPLEMENTATION-STYLE.
|
||||
;;; --njf, 06-02-2006
|
||||
#+nil (define-vop (fast-logbitp-c/fixnum fast-conditional-c/fixnum)
|
||||
(:translate logbitp)
|
||||
(:arg-types (:constant (integer 0 29)) tagged-num)
|
||||
|
|
|
|||
|
|
@ -326,10 +326,6 @@
|
|||
(constant (format nil "Const~D" offset))
|
||||
(immediate-constant "Immed"))))
|
||||
|
||||
(defun combination-implementation-style (node)
|
||||
(declare (type sb-c::combination node) (ignore node))
|
||||
(values :default nil))
|
||||
|
||||
(defun primitive-type-indirect-cell-type (ptype)
|
||||
(declare (ignore ptype))
|
||||
nil)
|
||||
|
|
|
|||
|
|
@ -298,10 +298,6 @@
|
|||
(constant (format nil "Const~D" offset))
|
||||
(immediate-constant "Immed"))))
|
||||
|
||||
(defun combination-implementation-style (node)
|
||||
(declare (type sb-c::combination node) (ignore node))
|
||||
(values :default nil))
|
||||
|
||||
(defun primitive-type-indirect-cell-type (ptype)
|
||||
(declare (ignore ptype))
|
||||
nil)
|
||||
|
|
|
|||
|
|
@ -360,10 +360,6 @@
|
|||
(constant (format nil "Const~D" offset))
|
||||
(immediate-constant "Immed"))))
|
||||
|
||||
(defun combination-implementation-style (node)
|
||||
(declare (type sb-c::combination node) (ignore node))
|
||||
(values :default nil))
|
||||
|
||||
(defun primitive-type-indirect-cell-type (ptype)
|
||||
(declare (ignore ptype))
|
||||
nil)
|
||||
|
|
|
|||
|
|
@ -2660,7 +2660,7 @@
|
|||
|
||||
(deftransform logbitp ((index integer) (:or ((signed-word signed-word) *)
|
||||
((word word) *)) * :vop t)
|
||||
(not (sb-c::logbitp-to-minusp-p index integer))t)
|
||||
(not (sb-c::logbitp-to-minusp-p index integer)))
|
||||
|
||||
;;; TODO: The TEST instruction preceding this JEQ is entirely superfluous
|
||||
;;; and can be removed with a vop optimizer:
|
||||
|
|
|
|||
|
|
@ -582,10 +582,6 @@
|
|||
(defconstant nargs-offset rcx-offset)
|
||||
(defconstant cfp-offset rbp-offset) ; pfw - needed by stuff in /code
|
||||
|
||||
(defun combination-implementation-style (node)
|
||||
(declare (ignore node))
|
||||
(values :default nil))
|
||||
|
||||
(defvar *register-names* +qword-register-names+)
|
||||
|
||||
;;; See WRITE-FUNINSTANCE-PROLOGUE in x86-64-vm.
|
||||
|
|
|
|||
|
|
@ -446,7 +446,3 @@
|
|||
(constant (format nil "Const~D" offset))
|
||||
(immediate-constant "Immed")
|
||||
(noise (symbol-name (sc-name sc))))))
|
||||
|
||||
(defun combination-implementation-style (node)
|
||||
(declare (ignore node))
|
||||
(values :default nil))
|
||||
|
|
|
|||
Loading…
Reference in a new issue