From f82dd4c66438609e0a6556ab1e87fd951f8550c8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Sat, 1 Jun 2013 12:55:35 +0100 Subject: [PATCH] Remove buggy `substitute' uses --- experimental/compiler.lisp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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) -- 1.7.10.4