Skip to content
Snippets Groups Projects
Commit 3f66c6b2 authored by ram's avatar ram
Browse files

Changed JOIN-BLOCKS-IF-POSSIBLE to join when the first block's last-cont is

deleted.
parent 14a2c261
No related branches found
No related tags found
No related merge requests found
......@@ -374,13 +374,15 @@
(when (block-lambda next)
(let* ((last (block-last block))
(last-cont (node-cont last))
(last-kind (continuation-kind last-cont))
(next-cont (block-start next))
(cleanup (block-end-cleanup block))
(next-cleanup (block-start-cleanup next))
(lambda (block-lambda block))
(next-lambda (block-lambda next)))
(cond ((or (rest (block-pred next))
(not (eq (continuation-use last-cont) last))
(and (not (eq (continuation-use last-cont) last))
(not (eq last-kind :deleted)))
(eq next block)
(not (eq (lambda-home lambda) (lambda-home next-lambda)))
(not (eq (find-enclosing-cleanup cleanup)
......@@ -390,11 +392,13 @@
(join-blocks block next)
t)
((and (null (block-start-uses next))
(eq (continuation-kind last-cont) :inside-block))
(member last-kind '(:inside-block :deleted)))
(let ((next-node (continuation-next next-cont)))
(assert (not (continuation-dest next-cont)))
(delete-continuation next-cont)
(setf (node-prev next-node) last-cont)
(setf (continuation-kind last-cont) :inside-block)
(setf (continuation-use last-cont) last)
(setf (continuation-next last-cont) next-node)
(setf (block-start next) last-cont)
(join-blocks block next))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment