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
Slava Pestov [Wed, 5 Aug 2009 02:01:21 +0000 (21:01 -0500)]
Refactor source-file-errors a little bit to remove some code duplication, and so that clicking 'Edit' in error list tool works for parse errors in unit tests
Slava Pestov [Mon, 3 Aug 2009 12:08:28 +0000 (07:08 -0500)]
compiler.cfg.stacks: more accurate deconcatenatization inserts fewer partially redundant ##peeks. 11% improvement on benchmark.beust2, 2% reduction in ##peek and ##replace instructions inserted
Joe Groff [Mon, 3 Aug 2009 00:52:33 +0000 (19:52 -0500)]
gpu.render: remove gpu-data-ptr slot specialization on index-elements. it prevents using specialized-arrays or other byte-array wrappers with index-elements
Slava Pestov [Mon, 3 Aug 2009 00:12:32 +0000 (19:12 -0500)]
compiler.cfg.def-use: remove compute-def-use word, passes have to call compute-defs or compute-uses now; compiler.cfg.ssa.liveness: don't compute dominance and def-use first since destruction does already