Slava Pestov [Sat, 15 Aug 2009 23:42:41 +0000 (18:42 -0500)]
compiler.tree.modular-arithmetic: stronger optimization handles > 1 usages case as well as values defined and used in loops. Eliminates 5 out of 8 >fixnum calls in benchmark.yuv-to-rgb
Slava Pestov [Wed, 12 Aug 2009 08:25:53 +0000 (03:25 -0500)]
More accurate wrap-interval in compiler.tree.propagation.info fixes test regression; constructing an interval with endpoints at infinity now outputs full-interval
Brad Christensen [Tue, 11 Aug 2009 06:34:25 +0000 (23:34 -0700)]
A number of documentation fixes.
* Short-circuit combinators now show correct stack effect for quots
* Groups and Clumps unchecked examples corrected, made runnable in listener
* Class operations had duplicate link to class-types
* Protocol slots readability fixed
* Tuple word property for "tuple-layout" corrected to "layout"
* cond>quot sentence started in lowercase
* Method precedence code example missing stack effect for GENERIC:, M: integer explain changed to detail an integer
* Motivation for default streams readability
* Default input and output streams duplicate readln link removed from output stream words section
* Looping combinators do description clarified
* Make philosophy missing space
* Linear order protocol duplicate after? link removed
* Parsing words readability fix
* Copied note regarding with-compilation-unit from define to define-declared and define-inline
Slava Pestov [Mon, 10 Aug 2009 21:17:33 +0000 (16:17 -0500)]
alien: need to differentiate between the type of the result before and after boxing; the former is used by propagation for #alien-invoke nodes and the latter is used by specialized arrays. This fixes FFI unit test failures
Slava Pestov [Mon, 10 Aug 2009 06:16:49 +0000 (01:16 -0500)]
compiler.tree.propagation: be more careful with intervals, ensuring that the inferred interval of a value is a subset of the value class's interval. This improves accuracy, for example [ >fixnum 1 + >fixnum most-positive-fixnum <= ] constant-folds to true
Slava Pestov [Sun, 9 Aug 2009 21:29:21 +0000 (16:29 -0500)]
compiler.tree.escape-analysis: if the output of an #introduce node has an immutable tuple class type declaration, and it is not passed to any subroutine calls, or returned from the word, then unbox it. This speeds up vector arithmetic words on specialized arrays, because the specialized array is unboxed up-front, eliminating an indirection on every loop iteration
Slava Pestov [Sun, 9 Aug 2009 08:07:33 +0000 (03:07 -0500)]
math.vectors.specialization: first attempt at some call site splitting for vector ops. Specialized array types generate customized variants of all vector words, if input types are known at compile time, a call to the specialized version is inserted
Slava Pestov [Sun, 9 Aug 2009 04:03:45 +0000 (23:03 -0500)]
More accurate interval inference for mod, rem, and propagation can now infer intervals in the case where a value might be f. so, [ [ 127 bitand ] [ drop f ] if dup [ 0 >= ] [ not ] if ] now constant-folds down to 't'!
Slava Pestov [Sun, 9 Aug 2009 01:02:56 +0000 (20:02 -0500)]
compiler.cfg: new system to track when results of analyses need to be recomputed (reverse post order, linear order, predecessors, dominance, loops). Passes can now call needs-predecessors, needs-dominance, needs-loops at the beginning, and cfg-changed, predecessors-changd at the end. Linearization order now takes loop nesting into account, and linear scan now uses linearization order instead of RPO.
Slava Pestov [Sat, 8 Aug 2009 09:02:18 +0000 (04:02 -0500)]
compiler.cfg: virtual registers are integers now, and representations are stored off to the side. Fix bug in representation selection that would manifest if a value was used as a float and a fixnum in different branches; cannot globally unbox float in this case
Slava Pestov [Sat, 8 Aug 2009 03:30:57 +0000 (22:30 -0500)]
classes.intersection: make flatten-class more accurate. It is still not perfect, but it fixes the case where a generic word has a method on a tuple class, and another method on an intersection of a mixin with another tuple classes
Slava Pestov [Wed, 5 Aug 2009 23:57:46 +0000 (18:57 -0500)]
compiler.cfg: convert code into two-operand form before SSA destruction; SSA destruction now operates on a relaxed SSA form where multiple defs of the same vreg are allowed, but only within a single basic block. This makes linear scan's coalescing redundant, allowing it to be removed completely