From f2fc3f84f4d6aa36f6c55db5eace5025c19993cf Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 16 Feb 2021 17:37:06 -0800 Subject: compiler: remove unreachable optimization. * share/txr/stdlib/optimize.tl (basic-blocks peephole-block): Remove the special optimization involving an unconditional jump followed by an if, to a block which tests the same register with another if. This optimization can't match because a jmp and if cannot be in a basic block together. --- share/txr/stdlib/optimize.tl | 7 ------- 1 file changed, 7 deletions(-) diff --git a/share/txr/stdlib/optimize.tl b/share/txr/stdlib/optimize.tl index e2cb0020..b0363755 100644 --- a/share/txr/stdlib/optimize.tl +++ b/share/txr/stdlib/optimize.tl @@ -90,13 +90,6 @@ (jmp @(and @jjlabel @(not @jlabel))) . @nil) ^((jmp ,jjlabel) ,*rest)) (@jelse insns)))) - (((if @reg @jlabel0) - (jmp @(with @jlabel1 - @(hash (@jlabel1 (@jlabel1 - (if @reg @nil) - (jmp @jlabel2) . @nil))) - bb.hash)) . @rest) - ^(,(car insns) (jmp ,jlabel2) ,*rest)) (((if @reg @jlabel) . @rest) (let ((jinsns [bb.hash jlabel])) (match-case jinsns -- cgit v1.2.3