1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 18:41:25 -08:00

* Follow cstr basic blocks to perform latch recognition

* lisp/emacs-lisp/comp.el (comp-fwprop-insn): Fix latch
	recognition.
This commit is contained in:
Andrea Corallo 2020-12-23 11:47:36 +01:00
parent fd8dd75a71
commit c90aa68d90

View file

@ -2540,9 +2540,12 @@ Fold the call in case."
(`(phi ,lval . ,rest) (`(phi ,lval . ,rest)
(let* ((from-latch (cl-some (let* ((from-latch (cl-some
(lambda (x) (lambda (x)
(comp-latch-p (let* ((bb-name (cadr x))
(gethash (cdr x) (bb (gethash bb-name
(comp-func-blocks comp-func)))) (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)) rest))
(prop-fn (if from-latch (prop-fn (if from-latch
#'comp-cstr-union-no-range #'comp-cstr-union-no-range