emacs-diffs
[Top][All Lists]
Advanced

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

feature/native-comp 807471f 8/8: ; * lisp/emacs-lisp/comp.el (comp-compu


From: Andrea Corallo
Subject: feature/native-comp 807471f 8/8: ; * lisp/emacs-lisp/comp.el (comp-compute-dominator-tree): Reindent.
Date: Fri, 1 Jan 2021 08:08:14 -0500 (EST)

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

    ; * lisp/emacs-lisp/comp.el (comp-compute-dominator-tree): Reindent.
---
 lisp/emacs-lisp/comp.el | 52 +++++++++++++++++++++++++------------------------
 1 file changed, 27 insertions(+), 25 deletions(-)

diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 848bcf7..9fea345 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -2651,31 +2651,33 @@ blocks."
                (entry (gethash 'entry blocks))
                ;; No point to go on if the only bb is 'entry'.
                (bb0 (gethash 'bb_0 blocks)))
-      (cl-loop with rev-bb-list = (comp-collect-rev-post-order entry)
-               with changed = t
-               while changed
-               initially (progn
-                           (comp-log "Computing dominator tree...\n" 2)
-                           (setf (comp-block-dom entry) entry)
-                           ;; Set the post order number.
-                           (cl-loop for name in (reverse rev-bb-list)
-                                    for b = (gethash name blocks)
-                                    for i from 0
-                                    do (setf (comp-block-post-num b) i)))
-               do (cl-loop
-                   for name in (cdr rev-bb-list)
-                   for b = (gethash name blocks)
-                   for preds = (comp-block-preds b)
-                   for new-idom = (first-processed preds)
-                   initially (setf changed nil)
-                   do (cl-loop for p in (delq new-idom preds)
-                               when (comp-block-dom p)
-                                 do (setf new-idom (intersect p new-idom)))
-                   unless (eq (comp-block-dom b) new-idom)
-                   do (setf (comp-block-dom b) (unless (and (comp-block-lap-p 
new-idom)
-                                                            
(comp-block-lap-no-ret new-idom))
-                                                 new-idom)
-                            changed t))))))
+      (cl-loop
+       with rev-bb-list = (comp-collect-rev-post-order entry)
+       with changed = t
+       while changed
+       initially (progn
+                   (comp-log "Computing dominator tree...\n" 2)
+                   (setf (comp-block-dom entry) entry)
+                   ;; Set the post order number.
+                   (cl-loop for name in (reverse rev-bb-list)
+                            for b = (gethash name blocks)
+                            for i from 0
+                            do (setf (comp-block-post-num b) i)))
+       do (cl-loop
+           for name in (cdr rev-bb-list)
+           for b = (gethash name blocks)
+           for preds = (comp-block-preds b)
+           for new-idom = (first-processed preds)
+           initially (setf changed nil)
+           do (cl-loop for p in (delq new-idom preds)
+                       when (comp-block-dom p)
+                       do (setf new-idom (intersect p new-idom)))
+           unless (eq (comp-block-dom b) new-idom)
+           do (setf (comp-block-dom b) (unless (and (comp-block-lap-p new-idom)
+                                                    (comp-block-lap-no-ret
+                                                     new-idom))
+                                         new-idom)
+                    changed t))))))
 
 (defun comp-compute-dominator-frontiers ()
   "Compute the dominator frontier for each basic block in `comp-func'."



reply via email to

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