simplify types introduced during constraint propagation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
(time (compile
nil
'(lambda ()
(let ((start 4))
(let ((start 6))
(let ((start 10))
[ Update: 1.0.14.36 improved this quite a bit (20-25%) by
eliminating useless work from PROPAGATE-FROM-SETS -- but as alluded
below, maybe we should be smarter about when to decide a derived
type is "good enough". ]
This example could be solved with clever enough constraint
propagation or with SSA, but consider
(let ((x 0))
(loop (incf x 2)))
The careful type of X is {2k} :-(. Is it really important to be
able to work with unions of many intervals?
Changed in sbcl: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in sbcl: | |
assignee: | nobody → Nikodemus Siivola (nikodemus) |
status: | Confirmed → In Progress |
Another example:
(defun foo ()
(labels ((bar (baz bim)
(let ((n (+ baz bim)))
(* n (+ n 1) bim))))
(let ((a (bar 1 1))
(b (bar 1 5))
(c (bar 1 15)))
(- (+ a b) c))))