Function: comp-dom-tree-walker
comp-dom-tree-walker is a byte-compiled function defined in
comp.el.gz.
Signature
(comp-dom-tree-walker BB PRE-LAMBDA POST-LAMBDA)
Documentation
Dominator tree walker function starting from basic block BB.
PRE-LAMBDA and POST-LAMBDA are called in pre or post-order if non-nil.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/comp.el.gz
(defun comp-dom-tree-walker (bb pre-lambda post-lambda)
"Dominator tree walker function starting from basic block BB.
PRE-LAMBDA and POST-LAMBDA are called in pre or post-order if non-nil."
(when pre-lambda
(funcall pre-lambda bb))
(when-let ((out-edges (comp-block-out-edges bb)))
(cl-loop for ed in out-edges
for child = (comp-edge-dst ed)
when (eq bb (comp-block-idom child))
;; Current block is the immediate dominator then recur.
do (comp-dom-tree-walker child pre-lambda post-lambda)))
(when post-lambda
(funcall post-lambda bb)))