emacs-diffs
[Top][All Lists]
Advanced

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

feature/native-comp c90aa68 3/5: * Follow cstr basic blocks to perform l


From: Andrea Corallo
Subject: feature/native-comp c90aa68 3/5: * Follow cstr basic blocks to perform latch recognition
Date: Wed, 23 Dec 2020 10:23:21 -0500 (EST)

branch: feature/native-comp
commit c90aa68d90b1c5805d3d6327a058098d938ac72f
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>

    * Follow cstr basic blocks to perform latch recognition
    
        * lisp/emacs-lisp/comp.el (comp-fwprop-insn): Fix latch
        recognition.
---
 lisp/emacs-lisp/comp.el | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 2f85879..485e5dc 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



reply via email to

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