diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-04-08 17:06:59 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-04-08 17:06:59 -0700 |
commit | 9f757186a0fc5de9bce7a26f0f0d422a92b45276 (patch) | |
tree | 533b5434d78d65370ca22eb94120bd942545df28 /stdlib | |
parent | f88f74ad3043a496f8945d6e139e3b3eb51c36aa (diff) | |
download | txr-9f757186a0fc5de9bce7a26f0f0d422a92b45276.tar.gz txr-9f757186a0fc5de9bce7a26f0f0d422a92b45276.tar.bz2 txr-9f757186a0fc5de9bce7a26f0f0d422a92b45276.zip |
compiler: small fix in optimizer.
* stdlib/optimizer.tl (basic-blocks do-peephole-block): Use
pushnew instead of push in one peephole case, so the block
isn't pushed onto the tryjoin and rescan lists twice.
Diffstat (limited to 'stdlib')
-rw-r--r-- | stdlib/optimize.tl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stdlib/optimize.tl b/stdlib/optimize.tl index 8bf8b8c9..8651db00 100644 --- a/stdlib/optimize.tl +++ b/stdlib/optimize.tl @@ -436,8 +436,8 @@ (@nil insns)))) (@(require ((if @(as reg (d @nil)) @nil) . @nil) (not (memqual reg bb.lt-dregs))) - (push bl bb.tryjoin) - (push bl bb.rescan) + (pushnew bl bb.tryjoin) + (pushnew bl bb.rescan) (pushnew bl.next bb.rescan) (set bb.recalc t) nil) |