From: David Vázquez Date: Sat, 1 Jun 2013 11:55:35 +0000 (+0100) Subject: Remove buggy `substitute' uses X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=f82dd4c66438609e0a6556ab1e87fd951f8550c8;p=jscl.git Remove buggy `substitute' uses --- diff --git a/experimental/compiler.lisp b/experimental/compiler.lisp index 6f6de91..6b11e1b 100644 --- a/experimental/compiler.lisp +++ b/experimental/compiler.lisp @@ -311,7 +311,8 @@ (setf (block-pred block) nil) (dolist (pred predecessors) (pushnew pred (block-pred new-block)) - (setf (block-succ pred) (substitute new-block block (block-succ pred))) + (setf (block-succ pred) (remove block (block-succ pred))) + (pushnew new-block (block-succ pred)) (unless (component-entry-p pred) (let ((last-node (node-prev (block-exit pred)))) (when (conditional-p last-node) @@ -731,7 +732,8 @@ (setf (block-exit block) (block-exit succ)) (setf (block-succ block) (block-succ succ)) (dolist (next (block-succ succ)) - (setf (block-pred next) (substitute block succ (block-pred next)))) + (setf (block-pred next) (remove succ (block-pred next))) + (pushnew block (block-pred next))) (setf (block-succ succ) nil (block-pred succ) nil) t)))) @@ -963,7 +965,8 @@ (dolist (pred (cdr predecessors) newblocks) (let ((newblock (copy-basic-block block))) (setf (block-pred newblock) (list pred)) - (setf (block-succ pred) (substitute newblock block (block-succ pred))) + (setf (block-succ pred) (remove block (block-succ pred))) + (pushnew newblock (block-succ pred)) (push newblock newblocks)))))))) ;; Reduce component using the transformations T1 and T2 as much ;; as possible. Then apply the node splitting transformation (S)