[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'."
- feature/native-comp updated (db2a493 -> 807471f), Andrea Corallo, 2021/01/01
- feature/native-comp e81643b 1/8: * Add `comp-insert-insn', Andrea Corallo, 2021/01/01
- feature/native-comp f78580a 2/8: * lisp/emacs-lisp/comp.el (comp-limple-lock-keywords): Color returns as red., Andrea Corallo, 2021/01/01
- feature/native-comp 6ba94f7 5/8: * src/comp.c (Fcomp__compile_ctxt_to_file): Fix hash table iteration., Andrea Corallo, 2021/01/01
- feature/native-comp e9f5fad 3/8: * Fix two predicates for missing negation handling, Andrea Corallo, 2021/01/01
- feature/native-comp 93ff838 6/8: * Clean unreachable block using dominance tree to handle circularities, Andrea Corallo, 2021/01/01
- feature/native-comp 67c443a 4/8: Introduce 'unreachable' LIMPLE operator, Andrea Corallo, 2021/01/01
- feature/native-comp c29037c 7/8: * lisp/emacs-lisp/comp.el (comp-compute-dominator-tree): Fix., Andrea Corallo, 2021/01/01
- feature/native-comp 807471f 8/8: ; * lisp/emacs-lisp/comp.el (comp-compute-dominator-tree): Reindent.,
Andrea Corallo <=