Simplify EMIT-GENERIC-VOP.
[sbcl.git] / src / compiler / ir2opt.lisp
index 9919074..8705c4a 100644 (file)
              (let ((end  (ir2-block-last-vop 2block))
                    (move (template-or-lose 'move)))
                (multiple-value-bind (first last)
-                   (funcall (template-emit-function move) node 2block
-                            move (reference-tn src nil)
-                            (reference-tn dst t))
+                   (emit-vop node 2block move
+                             (reference-tn src nil)
+                             (reference-tn dst t))
                  (insert-vop-sequence first last 2block end))))))
     (load-and-coerce arg-if   value-if)
     (load-and-coerce arg-else value-else))
     (maybe-convert-one-cmov 2block)))
 
 (defun delete-unused-ir2-blocks (component)
-  (declare (component component))
+  (declare (type component component))
   (let ((live-2blocks (make-hash-table)))
     (labels ((mark-2block (2block)
                (declare (type ir2-block 2block))
              (do ((2block (ir2-block-next 2block)
                     (ir2-block-next 2block)))
                  ((null 2block) nil)
-               (cond ((eq target (ir2-block-%label 2block))
+               (cond ((ir2-block-%trampoline-label 2block)
+                      (return nil))
+                     ((eq target (ir2-block-%label 2block))
                       (return t))
                      ((ir2-block-start-vop 2block)
                       (return nil)))))))