diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-07-12 15:05:46 +0200 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-07-13 14:44:29 +0200 |
commit | eb091c8647a7d10b02e49e61f3c5a0ce3d5ec0a4 (patch) | |
tree | 531619e35f3837ffededc860c3c9ae94d5266cd6 /lisp/emacs-lisp/comp.el | |
parent | 36c289ec8b848e71729bd8715bc1a606f61711c9 (diff) | |
download | emacs-eb091c8647a7d10b02e49e61f3c5a0ce3d5ec0a4.tar.gz emacs-eb091c8647a7d10b02e49e61f3c5a0ce3d5ec0a4.tar.bz2 emacs-eb091c8647a7d10b02e49e61f3c5a0ce3d5ec0a4.zip |
* Rename `comp-propagate' into `fw-prop'
* lisp/emacs-lisp/comp.el (comp-passes): Rename `comp-propagate'
-> `comp-fwprop'.
(comp-fwprop-prologue): Rename from `comp-propagate-prologue'.
(comp-fwprop-insn): Rename from `comp-fwprop-insn'.
(comp-propagate*): Rename from `comp-propagate*' and update.
(comp-fwprop): Rename from `comp-propagate' and update.
Diffstat (limited to 'lisp/emacs-lisp/comp.el')
-rw-r--r-- | lisp/emacs-lisp/comp.el | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 9e144dc5958..065417d1d97 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -162,13 +162,13 @@ Can be one of: 'd-default', 'd-impure' or 'd-ephemeral'. See `comp-ctxt'.") (defconst comp-passes '(comp-spill-lap comp-limplify - comp-propagate + comp-fwprop comp-call-optim comp-ipa-pure - comp-propagate + comp-fwprop comp-dead-code comp-tco - comp-propagate + comp-fwprop comp-remove-type-hints comp-final) "Passes to be executed in order.") @@ -2012,7 +2012,7 @@ PRE-LAMBDA and POST-LAMBDA are called in pre or post-order if non nil." for (func-name . def) in env do (setf (symbol-function func-name) def))))) -(defun comp-propagate-prologue () +(defun comp-fwprop-prologue () "Prologue for the propagate pass. Here goes everything that can be done not iteratively (read once). Forward propagate immediate involed in assignments." @@ -2066,7 +2066,7 @@ Forward propagate immediate involed in assignments." (value (comp-apply-in-env f (mapcar #'comp-mvar-constant args)))) (rewrite-insn-as-setimm insn value))))))) -(defun comp-propagate-insn (insn) +(defun comp-fwprop-insn (insn) "Propagate within INSN." (pcase insn (`(set ,lval ,rval) @@ -2102,7 +2102,7 @@ Forward propagate immediate involed in assignments." (eqs (cl-every (lambda (y) (eq x y)) types))) (setf (comp-mvar-type lval) x))))) -(defun comp-propagate* () +(defun comp-fwprop* () "Propagate for set* and phi operands. Return t if something was changed." (cl-loop with modified = nil @@ -2110,12 +2110,12 @@ Return t if something was changed." do (cl-loop for insn in (comp-block-insns b) for orig-insn = (unless modified ; Save consing after 1th change. (comp-copy-insn insn)) - do (comp-propagate-insn insn) + do (comp-fwprop-insn insn) when (and (null modified) (not (equal insn orig-insn))) do (setf modified t)) finally return modified)) -(defun comp-propagate (_) +(defun comp-fwprop (_) "Forward propagate types and consts within the lattice." (comp-ssa) (maphash (lambda (_ f) @@ -2123,10 +2123,10 @@ Return t if something was changed." ;; FIXME remove the following condition when tested. (not (comp-func-has-non-local f))) (let ((comp-func f)) - (comp-propagate-prologue) + (comp-fwprop-prologue) (cl-loop for i from 1 - while (comp-propagate*) + while (comp-fwprop*) finally (comp-log (format "Propagation run %d times\n" i) 2)) (comp-log-func comp-func 3)))) (comp-ctxt-funcs-h comp-ctxt))) |