anchor.diff:          (mapcar #'add (ir:instruction-inputs inst))
           (mapcar #'add (ir:instruction-outputs inst))))
       (values vreg-to-id id-to-vreg)))
  +
  +(deftype vreg-id () 'fixnum)
   
   (defun make-linear-allocator (backend-function architecture &key ordering)
     (multiple-value-bind (basic-blocks bb-preds bb-succs)
  
positive.code:     result))
  
  (defun make-vreg-set ()
    (make-array 4 :adjustable t :fill-pointer 0))
  
  (defun insert-into-vreg-set (set vreg)
    ;; Search for the position to insert into.
    ;; IMIN/IMAX are inclusive indicies.
    (do* ((imin 0)
          (imax (1- (length set))))
         ((< imax imin)
          (vector-push-extend 0 set)
          (replace set set
                   :start1 (1+ imin)
                   :start2 imin)
          (setf (aref set imin) vreg)
          nil)
      (declare (type (vector t) set))
      (let* ((imid (ash (+ imin imax) -1))
             (entry (aref set imid)))
        (cond ((eql entry vreg)
               ;; Already in the array, return.
               (return t))
              ((< entry vreg)
               (setf imin (1+ imid)))
              (t
               (setf imax (1- imid)))))))
  
  (defun vreg-set-contains (set vreg)
    (when (null set)
      (return-from vreg-set-contains nil))
    (do* ((imin 0)
          (imax (1- (length set))))
         ((< imax imin)
          nil)
      (declare (type (vector t) set))
      (let* ((imid (ash (+ imin imax) -1))
             (entry (aref set imid)))
        (cond ((eql entry vreg)
               (return t))
              ((< entry vreg)
  
negative.code:            ;; Add new interference edges.
             (dolist (range live)
               (flet ((insert (vreg other)
                        (setf (svref result vreg) (insert-into-vreg-set (svref result vreg) other))))
                 (let ((other-vreg (live-range-vreg-id range)))
                   (when (and (not (eql other-vreg current-vreg))
                              (not (vreg-set-contains (svref result other-vreg) current-vreg)))
                     (insert current-vreg other-vreg)
                     (insert other-vreg current-vreg)))))
             (push range live)))
  