* 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)
(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