[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 0cef208 7/7: * Reorganize passes
From: |
Andrea Corallo |
Subject: |
feature/native-comp 0cef208 7/7: * Reorganize passes |
Date: |
Sun, 1 Mar 2020 14:41:57 -0500 (EST) |
branch: feature/native-comp
commit 0cef208cc32c29b143be262fe673e7518b6ef2a8
Author: Andrea Corallo <address@hidden>
Commit: Andrea Corallo <address@hidden>
* Reorganize passes
- Make propagate responsible for keeping SSA up to date.
- Run propagate-alloc as very last before final not to risk bothering
with mvar array allocation during previous tranformations.
- Fix SSA if TCO modify the CFG.
---
lisp/emacs-lisp/comp.el | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 9037c23..e14f350 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -120,12 +120,12 @@ Can be one of: 'd-default', 'd-impure' or 'd-ephemeral'.
See `comp-ctxt'.")
(defconst comp-passes '(comp-spill-lap
comp-limplify
- comp-ssa
- comp-propagate-1
+ comp-propagate
comp-call-optim
- comp-propagate-2
+ comp-propagate
comp-dead-code
comp-tco
+ comp-propagate-alloc
comp-final)
"Passes to be executed in order.")
@@ -1546,7 +1546,7 @@ PRE-LAMBDA and POST-LAMBDA are called in pre or
post-order if non nil."
when (eq op 'phi)
do (finalize-phi args b)))))
-(defun comp-ssa (_)
+(defun comp-ssa ()
"Port all functions into mininal SSA form."
(maphash (lambda (_ f)
(let* ((comp-func f)
@@ -1736,7 +1736,8 @@ Return t if something was changed."
do (setf modified t))
finally return modified))
-(defun comp-propagate-iterate (backward)
+(defun comp-propagate1 (backward)
+ (comp-ssa)
(when (>= comp-speed 2)
(maphash (lambda (_ f)
;; FIXME remove the following condition when tested.
@@ -1750,14 +1751,14 @@ Return t if something was changed."
(comp-log-func comp-func 3))))
(comp-ctxt-funcs-h comp-ctxt))))
-(defun comp-propagate-1 (_)
+(defun comp-propagate (_)
"Forward propagate types and consts within the lattice."
- (comp-propagate-iterate nil))
+ (comp-propagate1 nil))
-(defun comp-propagate-2 (_)
+(defun comp-propagate-alloc (_)
"Forward propagate types and consts within the lattice.
Backward propagate array placement properties."
- (comp-propagate-iterate t))
+ (comp-propagate1 t))
;;; Call optimizer pass specific code.
- feature/native-comp updated (86cc937 -> 0cef208), Andrea Corallo, 2020/03/01
- feature/native-comp 62384df 2/7: * Reduce stack depth while marking native compiled subrs, Andrea Corallo, 2020/03/01
- feature/native-comp b7f3624 3/7: * Rename comp-emit-set-const -> comp-emit-setimm, Andrea Corallo, 2020/03/01
- feature/native-comp 0cef208 7/7: * Reorganize passes,
Andrea Corallo <=
- feature/native-comp b41d76f 5/7: Remove relocation index form LIMPLE setimm, Andrea Corallo, 2020/03/01
- feature/native-comp f60cb02 6/7: * Allow for multiple SSA runs, Andrea Corallo, 2020/03/01
- feature/native-comp 5543338 4/7: Optimize relocation classes for object duplication, Andrea Corallo, 2020/03/01
- feature/native-comp 6664f98 1/7: Merge remote-tracking branch 'savannah/master' into HEAD, Andrea Corallo, 2020/03/01