summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-02-15 12:01:37 -0800
committerKaz Kylheku <kaz@kylheku.com>2021-02-15 12:01:37 -0800
commit9aef25b8b9332bb99f78f09c3f9abf5f77cdcc90 (patch)
tree1d5fb6631bdb777fb503030e37ca215f047a21dc
parentde1340ac942e1d9c5f3e87109846359b2dcd077d (diff)
downloadtxr-9aef25b8b9332bb99f78f09c3f9abf5f77cdcc90.tar.gz
txr-9aef25b8b9332bb99f78f09c3f9abf5f77cdcc90.tar.bz2
txr-9aef25b8b9332bb99f78f09c3f9abf5f77cdcc90.zip
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.
-rw-r--r--share/txr/stdlib/optimize.tl1
1 files changed, 1 insertions, 0 deletions
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))))