diff options
author | Andrea Corallo <acorallo@gnu.org> | 2024-04-07 14:35:53 +0200 |
---|---|---|
committer | Andrea Corallo <acorallo@gnu.org> | 2024-07-11 16:26:49 +0200 |
commit | 8538a281f53107b69ed4a4b0d21f237cd79de400 (patch) | |
tree | aa4ad05a9b515745efcb95c5074fae7e22f2f65b /lisp/emacs-lisp | |
parent | c3e6923b0043711a688a677edb52b31fa1640f0e (diff) | |
download | emacs-8538a281f53107b69ed4a4b0d21f237cd79de400.tar.gz emacs-8538a281f53107b69ed4a4b0d21f237cd79de400.tar.bz2 emacs-8538a281f53107b69ed4a4b0d21f237cd79de400.zip |
Split 'comp--ssa' code
* lisp/emacs-lisp/comp.el (comp--ssa-function): New function.
(comp--ssa): Update.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/comp.el | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 0a2c520c5d5..06261e30402 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -2548,26 +2548,29 @@ Return t when one or more block was removed, nil otherwise." ret t) finally return ret)) +(defun comp--ssa-function (function) + "Port into minimal SSA FUNCTION." + (let* ((comp-func function) + (ssa-status (comp-func-ssa-status function))) + (unless (eq ssa-status t) + (cl-loop + when (eq ssa-status 'dirty) + do (comp--clean-ssa function) + do (comp--compute-edges) + (comp--compute-dominator-tree) + until (null (comp--remove-unreachable-blocks))) + (comp--compute-dominator-frontiers) + (comp--log-block-info) + (comp--place-phis) + (comp--ssa-rename) + (comp--finalize-phis) + (comp--log-func comp-func 3) + (setf (comp-func-ssa-status function) t)))) + (defun comp--ssa () - "Port all functions into minimal SSA form." - (maphash (lambda (_ f) - (let* ((comp-func f) - (ssa-status (comp-func-ssa-status f))) - (unless (eq ssa-status t) - (cl-loop - when (eq ssa-status 'dirty) - do (comp--clean-ssa f) - do (comp--compute-edges) - (comp--compute-dominator-tree) - until (null (comp--remove-unreachable-blocks))) - (comp--compute-dominator-frontiers) - (comp--log-block-info) - (comp--place-phis) - (comp--ssa-rename) - (comp--finalize-phis) - (comp--log-func comp-func 3) - (setf (comp-func-ssa-status f) t)))) - (comp-ctxt-funcs-h comp-ctxt))) + "Port all functions into minimal SSA all functions." + (cl-loop for f being the hash-value in (comp-ctxt-funcs-h comp-ctxt) + do (comp--ssa-function f))) ;;; propagate pass specific code. |