[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp e81643b 1/8: * Add `comp-insert-insn'
From: |
Andrea Corallo |
Subject: |
feature/native-comp e81643b 1/8: * Add `comp-insert-insn' |
Date: |
Fri, 1 Jan 2021 08:08:11 -0500 (EST) |
branch: feature/native-comp
commit e81643bef500e1f1ec49d152f7db1ffc5a74ecd5
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
* Add `comp-insert-insn'
* lisp/emacs-lisp/comp.el (comp-insert-insn): New inline.
(comp-emit-call-cstr): Split logic and call `comp-insert-insn'.
---
lisp/emacs-lisp/comp.el | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index b6ade0b..d7578fd 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -2391,16 +2391,21 @@ TARGET-BB-SYM is the symbol name of the target block."
(comp-emit-assume 'and target-mvar cstr block-target negated))
finally (cl-return-from in-the-basic-block)))))))
+(defsubst comp-insert-insn (insn insn-cell)
+ "Insert INSN as second insn of INSN-CELL."
+ (let ((next-cell (cdr insn-cell))
+ (new-cell `(,insn)))
+ (setf (cdr insn-cell) new-cell
+ (cdr new-cell) next-cell
+ (comp-func-ssa-status comp-func) 'dirty)))
+
(defun comp-emit-call-cstr (mvar call-cell cstr)
"Emit a constraint CSTR for MVAR after CALL-CELL."
- (let* ((next-cell (cdr call-cell))
- (new-mvar (make-comp-mvar :slot (comp-mvar-slot mvar)))
+ (let* ((new-mvar (make-comp-mvar :slot (comp-mvar-slot mvar)))
;; Have new-mvar as LHS *and* RHS to ensure monotonicity and
;; fwprop convergence!!
- (new-cell `((assume ,new-mvar (and ,new-mvar ,mvar ,cstr)))))
- (setf (cdr call-cell) new-cell
- (cdr new-cell) next-cell
- (comp-func-ssa-status comp-func) 'dirty)))
+ (insn `(assume ,new-mvar (and ,new-mvar ,mvar ,cstr))))
+ (comp-insert-insn insn call-cell)))
(defun comp-lambda-list-gen (lambda-list)
"Return a generator to iterate over LAMBDA-LIST."
- feature/native-comp updated (db2a493 -> 807471f), Andrea Corallo, 2021/01/01
- feature/native-comp e81643b 1/8: * Add `comp-insert-insn',
Andrea Corallo <=
- feature/native-comp f78580a 2/8: * lisp/emacs-lisp/comp.el (comp-limple-lock-keywords): Color returns as red., Andrea Corallo, 2021/01/01
- feature/native-comp 6ba94f7 5/8: * src/comp.c (Fcomp__compile_ctxt_to_file): Fix hash table iteration., Andrea Corallo, 2021/01/01
- feature/native-comp e9f5fad 3/8: * Fix two predicates for missing negation handling, Andrea Corallo, 2021/01/01
- feature/native-comp 93ff838 6/8: * Clean unreachable block using dominance tree to handle circularities, Andrea Corallo, 2021/01/01
- feature/native-comp 67c443a 4/8: Introduce 'unreachable' LIMPLE operator, Andrea Corallo, 2021/01/01
- feature/native-comp c29037c 7/8: * lisp/emacs-lisp/comp.el (comp-compute-dominator-tree): Fix., Andrea Corallo, 2021/01/01
- feature/native-comp 807471f 8/8: ; * lisp/emacs-lisp/comp.el (comp-compute-dominator-tree): Reindent., Andrea Corallo, 2021/01/01