- (cond ((or (rest (block-pred next))
- (not (eq (continuation-use last-cont) last))
- (eq next block)
- (not (eq (block-end-cleanup block)
- (block-start-cleanup next)))
- (not (eq (block-home-lambda block)
- (block-home-lambda next))))
+ (cond (;; We cannot combine with a successor block if:
+ (or
+ ;; The successor has more than one predecessor.
+ (rest (block-pred next))
+ ;; The last node's CONT is also used somewhere else.
+ (not (eq (continuation-use last-cont) last))
+ ;; The successor is the current block (infinite loop).
+ (eq next block)
+ ;; The next block has a different cleanup, and thus
+ ;; we may want to insert cleanup code between the
+ ;; two blocks at some point.
+ (not (eq (block-end-cleanup block)
+ (block-start-cleanup next)))
+ ;; The next block has a different home lambda, and
+ ;; thus the control transfer is a non-local exit.
+ (not (eq (block-home-lambda block)
+ (block-home-lambda next))))