Function: comp--compute-dominator-frontiers
comp--compute-dominator-frontiers is a byte-compiled function defined
in comp.el.gz.
Signature
(comp--compute-dominator-frontiers)
Documentation
Compute the dominator frontier for each basic block in comp-func.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/comp.el.gz
(defun comp--compute-dominator-frontiers ()
"Compute the dominator frontier for each basic block in `comp-func'."
;; Originally based on: "A Simple, Fast Dominance Algorithm"
;; Cooper, Keith D.; Harvey, Timothy J.; Kennedy, Ken (2001).
(cl-loop with blocks = (comp-func-blocks comp-func)
for b-name being each hash-keys of blocks
using (hash-value b)
for preds = (comp--block-preds b)
when (length> preds 1) ; All joins
do (cl-loop for p in preds
for runner = p
do (while (not (eq runner (comp-block-idom b)))
(puthash b-name b (comp-block-df runner))
(setf runner (comp-block-idom runner))))))