diff options
| author | Andrea Corallo | 2020-12-25 09:39:22 +0100 |
|---|---|---|
| committer | Andrea Corallo | 2020-12-25 09:44:30 +0100 |
| commit | bd693ccea7ba4a6aafda103f7a9166f76363c86b (patch) | |
| tree | bd6c675a0def12a181d546d1268a9b1792de4121 | |
| parent | b4ee13c94218062baa4d9d15176eee4aaf582d57 (diff) | |
| download | emacs-bd693ccea7ba4a6aafda103f7a9166f76363c86b.tar.gz emacs-bd693ccea7ba4a6aafda103f7a9166f76363c86b.zip | |
* Don't emit byte op-code annotations in LIMPLE to optimize for compile-time
Saves 10~15% in bootstrap time.
* lisp/emacs-lisp/comp.el (comp-op-case): Don't emit op-code
annotaitons.
(comp-limplify-lap-inst, comp-add-cond-cstrs-simple)
(comp-add-cond-cstrs, comp-tco-func): Update accordingly.
| -rw-r--r-- | lisp/emacs-lisp/comp.el | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 2f39b1d4cb3..1804f1f9dfa 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el | |||
| @@ -1390,9 +1390,9 @@ the annotation emission." | |||
| 1390 | if body | 1390 | if body |
| 1391 | collect `(',op | 1391 | collect `(',op |
| 1392 | ;; Log all LAP ops except the TAG one. | 1392 | ;; Log all LAP ops except the TAG one. |
| 1393 | ,(unless (eq op 'TAG) | 1393 | ;; ,(unless (eq op 'TAG) |
| 1394 | `(comp-emit-annotation | 1394 | ;; `(comp-emit-annotation |
| 1395 | ,(concat "LAP op " op-name))) | 1395 | ;; ,(concat "LAP op " op-name))) |
| 1396 | ;; Emit the stack adjustment if present. | 1396 | ;; Emit the stack adjustment if present. |
| 1397 | ,(when (and sp-delta (not (eq 0 sp-delta))) | 1397 | ,(when (and sp-delta (not (eq 0 sp-delta))) |
| 1398 | `(cl-incf (comp-sp) ,sp-delta)) | 1398 | `(cl-incf (comp-sp) ,sp-delta)) |
| @@ -1602,8 +1602,8 @@ the annotation emission." | |||
| 1602 | ;; Assume to follow the emission of a setimm. | 1602 | ;; Assume to follow the emission of a setimm. |
| 1603 | ;; This is checked into comp-emit-switch. | 1603 | ;; This is checked into comp-emit-switch. |
| 1604 | (comp-emit-switch (comp-slot+1) | 1604 | (comp-emit-switch (comp-slot+1) |
| 1605 | (cl-second (comp-block-insns | 1605 | (cl-first (comp-block-insns |
| 1606 | (comp-limplify-curr-block comp-pass))))) | 1606 | (comp-limplify-curr-block comp-pass))))) |
| 1607 | (byte-constant | 1607 | (byte-constant |
| 1608 | (comp-emit-setimm arg)) | 1608 | (comp-emit-setimm arg)) |
| 1609 | (byte-discardN-preserve-tos | 1609 | (byte-discardN-preserve-tos |
| @@ -2002,7 +2002,7 @@ TARGET-BB-SYM is the symbol name of the target block." | |||
| 2002 | (pcase insn-seq | 2002 | (pcase insn-seq |
| 2003 | (`((set ,(and (pred comp-mvar-p) tmp-mvar) | 2003 | (`((set ,(and (pred comp-mvar-p) tmp-mvar) |
| 2004 | ,(and (pred comp-mvar-p) obj1)) | 2004 | ,(and (pred comp-mvar-p) obj1)) |
| 2005 | (comment ,_comment-str) | 2005 | ;; (comment ,_comment-str) |
| 2006 | (cond-jump ,tmp-mvar ,obj2 . ,blocks)) | 2006 | (cond-jump ,tmp-mvar ,obj2 . ,blocks)) |
| 2007 | (cl-loop | 2007 | (cl-loop |
| 2008 | for branch-target-cell on blocks | 2008 | for branch-target-cell on blocks |
| @@ -2039,7 +2039,7 @@ TARGET-BB-SYM is the symbol name of the target block." | |||
| 2039 | (`((set ,(and (pred comp-mvar-p) obj1) | 2039 | (`((set ,(and (pred comp-mvar-p) obj1) |
| 2040 | (,(pred comp-call-op-p) | 2040 | (,(pred comp-call-op-p) |
| 2041 | ,(or 'eq 'eql '= 'equal) ,op1 ,op2)) | 2041 | ,(or 'eq 'eql '= 'equal) ,op1 ,op2)) |
| 2042 | (comment ,_comment-str) | 2042 | ;; (comment ,_comment-str) |
| 2043 | (cond-jump ,obj1 ,(pred comp-mvar-p) . ,blocks)) | 2043 | (cond-jump ,obj1 ,(pred comp-mvar-p) . ,blocks)) |
| 2044 | (cl-loop | 2044 | (cl-loop |
| 2045 | with target-mvar1 = (comp-cond-cstrs-target-mvar op1 (car insns-seq) b) | 2045 | with target-mvar1 = (comp-cond-cstrs-target-mvar op1 (car insns-seq) b) |
| @@ -2856,7 +2856,7 @@ Return the list of m-var ids nuked." | |||
| 2856 | for insns-seq on (comp-block-insns b) | 2856 | for insns-seq on (comp-block-insns b) |
| 2857 | do (pcase insns-seq | 2857 | do (pcase insns-seq |
| 2858 | (`((set ,l-val (direct-call ,func . ,args)) | 2858 | (`((set ,l-val (direct-call ,func . ,args)) |
| 2859 | (comment ,_comment) | 2859 | ;; (comment ,_comment) |
| 2860 | (return ,ret-val)) | 2860 | (return ,ret-val)) |
| 2861 | (when (and (string= func (comp-func-c-name comp-func)) | 2861 | (when (and (string= func (comp-func-c-name comp-func)) |
| 2862 | (eq l-val ret-val)) | 2862 | (eq l-val ret-val)) |