diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-12-23 11:47:36 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-12-23 12:03:39 +0100 |
commit | c90aa68d90b1c5805d3d6327a058098d938ac72f (patch) | |
tree | be0e8588da50b3c3debb8ccf89501298b62f0977 /lisp/emacs-lisp/comp.el | |
parent | fd8dd75a71eef796ba8fb1d2604fd615bebaae42 (diff) | |
download | emacs-c90aa68d90b1c5805d3d6327a058098d938ac72f.tar.gz emacs-c90aa68d90b1c5805d3d6327a058098d938ac72f.tar.bz2 emacs-c90aa68d90b1c5805d3d6327a058098d938ac72f.zip |
* Follow cstr basic blocks to perform latch recognition
* lisp/emacs-lisp/comp.el (comp-fwprop-insn): Fix latch
recognition.
Diffstat (limited to 'lisp/emacs-lisp/comp.el')
-rw-r--r-- | lisp/emacs-lisp/comp.el | 9 |
1 files changed, 6 insertions, 3 deletions
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 |