emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 627ac228b2 1/2: Don't inhibit LAP-level DCE when switch ops are p


From: Mattias Engdegård
Subject: master 627ac228b2 1/2: Don't inhibit LAP-level DCE when switch ops are present
Date: Fri, 27 Jan 2023 11:35:37 -0500 (EST)

branch: master
commit 627ac228b2ecdf179f36ea41fd0254c091744e4b
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>

    Don't inhibit LAP-level DCE when switch ops are present
    
    * lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode):
    Allow removal of unreachable basic blocks in the LAP peephole
    optimiser even when switch ops are present.  The origins of
    this apparently unnecessary condition are unclear.
---
 lisp/emacs-lisp/byte-opt.el | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index 039cebedb4..b1a46d520e 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -2227,18 +2227,12 @@ If FOR-EFFECT is non-nil, the return value is assumed 
to be of no importance."
         ;;
         ;; goto   ... --> goto   <delete until TAG or end>
         ;; return ... --> return <delete until TAG or end>
-        ;; (unless a jump-table is being used, where deleting may affect
-         ;; other valid case bodies)
          ;;
         ((and (memq (car lap0) '(byte-goto byte-return))
-              (not (memq (car lap1) '(TAG nil)))
-               ;; FIXME: Instead of deferring simply when jump-tables are
-               ;; being used, keep a list of tags used for switch tags and
-               ;; use them instead (see `byte-compile-inline-lapcode').
-               (not byte-compile-jump-tables))
+              (not (memq (car lap1) '(TAG nil))))
          (setq tmp rest)
          (let ((i 0)
-               (opt-p (memq byte-optimize-log '(t lap)))
+               (opt-p (memq byte-optimize-log '(t byte)))
                str deleted)
            (while (and (setq tmp (cdr tmp))
                        (not (eq 'TAG (car (car tmp)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]