[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 0ffb3df: Do not add unnecesary arg constraints (bug#
From: |
Andrea Corallo |
Subject: |
feature/native-comp 0ffb3df: Do not add unnecesary arg constraints (bug#45812 bug#45705 bug#45751). |
Date: |
Tue, 19 Jan 2021 16:01:26 -0500 (EST) |
branch: feature/native-comp
commit 0ffb3dfaa483b0c5cf1f7f367efcb5e9c041ab53
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
Do not add unnecesary arg constraints (bug#45812 bug#45705 bug#45751).
These have the effect of bloating the IR for no effect killing compile
time. The typical cases for that are extremely long backuoted lists.
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-t): New var.
* lisp/emacs-lisp/comp.el (comp-add-call-cstr): No need to add
arg call constraints if this is t.
---
lisp/emacs-lisp/comp-cstr.el | 3 +++
lisp/emacs-lisp/comp.el | 3 +++
2 files changed, 6 insertions(+)
diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el
index 651c7b7..1afb928 100644
--- a/lisp/emacs-lisp/comp-cstr.el
+++ b/lisp/emacs-lisp/comp-cstr.el
@@ -179,6 +179,9 @@ Return them as multiple value."
(defvar comp-cstr-one (comp-value-to-cstr 1)
"Represent the integer immediate one.")
+(defvar comp-cstr-t (comp-type-to-cstr t)
+ "Represent the superclass t.")
+
;;; Value handling.
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index d2e0d0f..02a9f4a 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -2513,6 +2513,9 @@ TARGET-BB-SYM is the symbol name of the target block."
do (signal 'native-ice
(list "Incoherent type specifier for function" f))
when (and target
+ ;; No need to add call constraints if this is t
+ ;; (bug#45812 bug#45705 bug#45751).
+ (not (equal comp-cstr-t cstr))
(or (null lhs)
(not (eql (comp-mvar-slot lhs)
(comp-mvar-slot target)))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- feature/native-comp 0ffb3df: Do not add unnecesary arg constraints (bug#45812 bug#45705 bug#45751).,
Andrea Corallo <=