From 5408cc94bf0fbc51027f8b9e35590b73888b93d2 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 15 Feb 2021 11:59:46 -0800 Subject: compiler: close instructions terminate basic block. * share/txr/stdlib/optimize.tl (struct basic-blocks): Include the close instruction in the set which terminate a basic block. A close is an unconditional jump; execution never continues after a close instruction, but goes unconditionally to a branch target. --- share/txr/stdlib/optimize.tl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/txr/stdlib/optimize.tl b/share/txr/stdlib/optimize.tl index 530c26d2..305bab9d 100644 --- a/share/txr/stdlib/optimize.tl +++ b/share/txr/stdlib/optimize.tl @@ -32,7 +32,7 @@ list rescan (:static start (gensym "start-")) - (:static jump-ops '(jmp if ifq ifql swtch ret abscsr)) + (:static jump-ops '(jmp if ifq ifql close swtch ret abscsr)) (:postinit (bb) (let* ((insns (dedup-labels (cons bb.start bb.insns))) -- cgit v1.2.3