From: Andrea Corallo Date: Wed, 23 Dec 2020 10:47:36 +0000 (+0100) Subject: * Follow cstr basic blocks to perform latch recognition X-Git-Tag: emacs-28.0.90~2727^2~232 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c90aa68d90b1c5805d3d6327a058098d938ac72f;p=emacs.git * Follow cstr basic blocks to perform latch recognition * lisp/emacs-lisp/comp.el (comp-fwprop-insn): Fix latch recognition. --- diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 2f8587909e6..485e5dc6ad2 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -2540,9 +2540,12 @@ Fold the call in case." (`(phi ,lval . ,rest) (let* ((from-latch (cl-some (lambda (x) - (comp-latch-p - (gethash (cdr x) - (comp-func-blocks comp-func)))) + (let* ((bb-name (cadr x)) + (bb (gethash bb-name + (comp-func-blocks comp-func)))) + (or (comp-latch-p bb) + (when (comp-block-cstr-p bb) + (comp-latch-p (car (comp-block-preds bb))))))) rest)) (prop-fn (if from-latch #'comp-cstr-union-no-range