diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-09-27 23:24:24 +0200 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-10-10 20:25:42 +0200 |
commit | 96f59a9faf375409a0301a54fcb46fc2325a9cc2 (patch) | |
tree | 1f173466b123632d7da86a186c08b2135809c530 /lisp/emacs-lisp/comp.el | |
parent | 8b135af5bbdfb6cf561f92a02ef92e855acc04dd (diff) | |
download | emacs-96f59a9faf375409a0301a54fcb46fc2325a9cc2.tar.gz emacs-96f59a9faf375409a0301a54fcb46fc2325a9cc2.tar.bz2 emacs-96f59a9faf375409a0301a54fcb46fc2325a9cc2.zip |
* Add into phi l-value args basic block names
* lisp/emacs-lisp/comp.el (comp-ssa-rename-insn): Clean-up a
leftover space.
(comp-finalize-phis): Cons the blasic block name providing the
mvar together with the mvar itself while forming the phi.
(comp-fwprop-insn): Destructure correctly the phi.
Diffstat (limited to 'lisp/emacs-lisp/comp.el')
-rw-r--r-- | lisp/emacs-lisp/comp.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index a4f2b6c36c7..be29f84cd32 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -1920,7 +1920,7 @@ PRE-LAMBDA and POST-LAMBDA are called in pre or post-order if non-nil." (`(fetch-handler . ,_) ;; Clobber all no matter what! (setf (aref frame slot-n) (make-comp-ssa-mvar :slot slot-n))) - (`(phi ,n) + (`(phi ,n) (when (equal n slot-n) (new-lvalue))) (_ @@ -1958,7 +1958,8 @@ PRE-LAMBDA and POST-LAMBDA are called in pre or post-order if non-nil." for e in (comp-block-in-edges b) for b = (comp-edge-src e) for in-frame = (comp-block-final-frame b) - collect (aref in-frame slot-n))))) + collect (cons (aref in-frame slot-n) + (comp-block-name b)))))) (cl-loop for b being each hash-value of (comp-func-blocks comp-func) do (cl-loop for (op . args) in (comp-block-insns b) @@ -2105,7 +2106,7 @@ Forward propagate immediate involed in assignments." (setf (comp-mvar-const-vld lval) t (comp-mvar-constant lval) v (comp-mvar-type lval) (comp-strict-type-of v))) - (`(phi ,lval . ,rest) + (`(phi (,lval . _) . ,rest) ;; Forward const prop here. (when-let* ((vld (cl-every #'comp-mvar-const-vld rest)) (consts (mapcar #'comp-mvar-constant rest)) |