From 4be8bc33aca9cd4c8aee2b6583939b0b552891e0 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 15 Feb 2021 12:01:37 -0800 Subject: compiler: re-scan block altered by frame-move. * share/txr/stdlib/optimize.tl (basic-blocks peephole-block): If we move a frame instruction past a jump into the next block, we must add that block's label to the rescan list. There may be an opportunity to propagate the frame instruction deeper into that block. I'm not seeing a difference from this change in the compilation of the standard library, which indicates that this is happening by fluke; the alteration of that block is happening before it has been visited. --- share/txr/stdlib/optimize.tl | 1 + 1 file changed, 1 insertion(+) diff --git a/share/txr/stdlib/optimize.tl b/share/txr/stdlib/optimize.tl index 305bab9d..e2cb0020 100644 --- a/share/txr/stdlib/optimize.tl +++ b/share/txr/stdlib/optimize.tl @@ -161,6 +161,7 @@ ((and xlabel ylabel) (set [bb.hash ylabel] ^(,ylabel ,(car insns) ,*(cdr yinsns))) + (push ylabel bb.rescan) ^((if (t ,reg) ,xlabel))) (t insns)))) (@jelse insns)))) -- cgit v1.2.3