summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-04-08 17:06:59 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-04-08 17:06:59 -0700
commit51951d19cefd722633a9c3fb065ab4db7b10a989 (patch)
tree533b5434d78d65370ca22eb94120bd942545df28
parent19443eae003a5a80ade596922f51b0d1cb2c545e (diff)
downloadtxr-51951d19cefd722633a9c3fb065ab4db7b10a989.tar.gz
txr-51951d19cefd722633a9c3fb065ab4db7b10a989.tar.bz2
txr-51951d19cefd722633a9c3fb065ab4db7b10a989.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.
-rw-r--r--stdlib/optimize.tl4
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)