summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-03-10 08:29:49 -0800
committerKaz Kylheku <kaz@kylheku.com>2021-03-10 08:29:49 -0800
commitb588887b0d6e02aa55462b3b6be97f06c06d34ba (patch)
treee758d93cebdfd7a0e6382070b7d197a08033dceb
parent828421ebc1b8102702382f07e3c9ab672da5abae (diff)
downloadtxr-b588887b0d6e02aa55462b3b6be97f06c06d34ba.tar.gz
txr-b588887b0d6e02aa55462b3b6be97f06c06d34ba.tar.bz2
txr-b588887b0d6e02aa55462b3b6be97f06c06d34ba.zip
compiler: eliminate unused global symbol accesses.
* share/txr/stdlib/optimize.tl (basic-blocks peephole-blocks): Extend dead reg mov pattern to also handle the getlx, getv, getf and getfb instructions.
-rw-r--r--share/txr/stdlib/optimize.tl2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/txr/stdlib/optimize.tl b/share/txr/stdlib/optimize.tl
index 5d0b2806..b1008d0a 100644
--- a/share/txr/stdlib/optimize.tl
+++ b/share/txr/stdlib/optimize.tl
@@ -355,7 +355,7 @@
(and li (bit li.used n) (not (bit bl.live n))))))
(rewrite-case insns code
;; dead t-reg
- (@(require ((mov (t @n) . @nil) . @nil)
+ (@(require ((@(or mov getlx getv getf getfb) (t @n) . @nil) . @nil)
(dead-treg (car insns) n))
(pushnew bl bb.rescan)
(set bb.recalc t)