[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-hackers] [PATCH] Revert half of "Add some optimizer simplificat
From: |
megane |
Subject: |
[Chicken-hackers] [PATCH] Revert half of "Add some optimizer simplification rules" |
Date: |
Mon, 16 Sep 2019 12:11:13 +0300 |
User-agent: |
mu4e 1.0; emacs 25.1.1 |
Hi,
This reverts the rewrite that unearthed #1648.
>From 896601d3fd9fd9e9e1a0bac407dccbf0e4bed1e8 Mon Sep 17 00:00:00 2001
From: megane <address@hidden>
Date: Mon, 16 Sep 2019 12:04:49 +0300
Subject: [PATCH] Revert half of "Add some optimizer simplification rules"
This causes uri-generic to fail to compile in similar way #1648 does.
---
optimizer.scm | 32 --------------------------------
1 file changed, 32 deletions(-)
diff --git a/optimizer.scm b/optimizer.scm
index fc2d3165..bd163710 100644
--- a/optimizer.scm
+++ b/optimizer.scm
@@ -830,38 +830,6 @@
args1)
nargs)
#t))
- (else (loop (cdr args)
- (cons (car args) nargs)
- ok)))))))
-
- ;; (let ((<var1> (##core#inline <op> ...)))
- ;; (<var2> ... <var1> ...))
- ;; -> (<var2> ... (##core#inline <op> ...) ...)
- ;; ...))
- ;; - <var1> is used only once.
- `((let (var) (##core#inline (op) . args1)
- (##core#call p . args2))
- (var op args1 p args2)
- ,(lambda (db may-rewrite var op args1 p args2)
- (and may-rewrite ; give other optimizations a chance first
- (= 1 (length (db-get-list db var 'references)))
- (let loop ((args args2) (nargs '()) (ok #f))
- (cond ((null? args)
- (and ok
- (make-node
- '##core#call p
- (reverse nargs))))
- ((and (eq? '##core#variable
- (node-class (car args)))
- (eq? var
- (car (node-parameters (car args)))))
- (loop (cdr args)
- (cons (make-node
- '##core#inline
- (list op)
- args1)
- nargs)
- #t))
(else (loop (cdr args)
(cons (car args) nargs)
ok))))))))
--
2.17.1
- [Chicken-hackers] [PATCH] Revert half of "Add some optimizer simplification rules",
megane <=