diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-04-16 21:21:36 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-04-16 21:21:36 -0700 |
commit | d85da8e7696cda9e6bd441c13371dcad5753785d (patch) | |
tree | 35ba0712a469ba611488f88d71fd6852e5b58a52 /stdlib | |
parent | bf6b46f16a5e691106a8868010807688fe756c84 (diff) | |
download | txr-d85da8e7696cda9e6bd441c13371dcad5753785d.tar.gz txr-d85da8e7696cda9e6bd441c13371dcad5753785d.tar.bz2 txr-d85da8e7696cda9e6bd441c13371dcad5753785d.zip |
compiler: bugfix: wrong propagation into close insn.
* stdlib/optimize.tl (basic-blocks rename): When
we encounter a close instruction, we must leave
it alone. The registers named in the argument area
of the instruction do not belong to the current
instruction stream or basic block; they belong to
the function body.
Diffstat (limited to 'stdlib')
-rw-r--r-- | stdlib/optimize.tl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/stdlib/optimize.tl b/stdlib/optimize.tl index 24cad22f..089b1334 100644 --- a/stdlib/optimize.tl +++ b/stdlib/optimize.tl @@ -363,8 +363,10 @@ (defmeth basic-blocks rename (bb insns dst src) (build (whilet ((insn (pop insns))) - (let ((li [bb.li-hash insn])) + (let ((close (if-match (close . @nil) insn t)) + (li [bb.li-hash insn])) (cond + (close (add insn)) ((or (mequal li.def0 dst src) (mequal li.def1 dst src)) (add insn) |