[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 47a6fbd 1/4: * Improve propagate pass
From: |
Andrea Corallo |
Subject: |
feature/native-comp 47a6fbd 1/4: * Improve propagate pass |
Date: |
Sun, 7 Jun 2020 15:06:39 -0400 (EDT) |
branch: feature/native-comp
commit 47a6fbd38278b40737d498a41a35259458633136
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
* Improve propagate pass
As function folding can generate 'setimm' insns handle them in the
`comp-propagate-insn'.
* lisp/emacs-lisp/comp.el (comp-propagate-insn): Handle 'setimm'
insn.
---
lisp/emacs-lisp/comp.el | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 4926c5d..ecd4115 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -1926,6 +1926,10 @@ Here goes everything that can be done not iteratively
(read once).
(comp-function-call-maybe-remove insn f args)))
(_
(comp-mvar-propagate lval rval))))
+ (`(setimm ,lval ,v)
+ (setf (comp-mvar-const-vld lval) t
+ (comp-mvar-constant lval) v
+ (comp-mvar-type lval) (comp-strict-type-of v)))
(`(phi ,lval . ,rest)
;; Forward const prop here.
(when-let* ((vld (cl-every #'comp-mvar-const-vld rest))