Slava Pestov
9f9b6bca01
compiler.tree.propagation: type check inputs to unsafe foldable words manually, so that stuff like [ "Hi" { } fixnum+fast ] doesn't crash in the compiler
2009-09-07 23:40:23 -05:00
Slava Pestov
a1ae209f81
compiler.tree.propagation.call-effect: stronger call( inlining; now can inline 'a [ b ] curry call(' where 'a' is literal, [ b ] doesn't infer, but [ a b ] does infer. This simplifies classes.struct:memory>struct
2009-09-07 17:45:03 -05:00
Slava Pestov
2bb6293217
compiler: add fixnum-min/max intrinsics; ~10% speedup on benchmark.yuv-to-rgb
2009-08-28 19:02:59 -05:00
Slava Pestov
d957ae4e44
Performance improvements to make struct-arrays benchmark faster
...
- improved optimization of ##unbox-any-c-ptr on ##box-displaced-alien; convert it to ##unbox-c-ptr where possible using class info stored in the ##bda instruction
- make fcos, fsin, etc inline again; everything in math.libm inline again, except for fsqrt which is an intrinsic
- convert min and max on floats to float-min and float-max
- make min and max not inline, so that the above can work
- struct-arrays: rice a bit so that more fixnums come up
2009-08-28 05:21:16 -05:00
Slava Pestov
ba0f3a9911
compiler.tree.propagation.transforms: don't fail to compile if 'at' called on something that's not an assoc
2009-08-27 18:57:56 -05:00
Slava Pestov
0df8aadce2
cpu.x86: use SQRTSD instruction for math.libm:fsqrt word
2009-08-25 23:22:15 -05:00
Slava Pestov
49bd2228ec
compiler.tree.modular-arithmetic: fix regression; set-alien-*-1 was not always open-coded
2009-08-20 17:56:49 -05:00
Slava Pestov
9ef8f6c81d
compiler.tree.modular-arithmetic: eliminate >bignum calls where possible, convert fixnum-shift to fixnum-shift-fast if shift count is positive, don't run if there are no modular values
2009-08-20 03:47:45 -05:00
Slava Pestov
f01f7ad6eb
compiler.tree.propagation: bitand custom inlining was wrong if the second input was a bignum
2009-08-20 03:47:07 -05:00
Slava Pestov
2dc99ea05f
Fix interval inference of abs, absq when input is a complex number
2009-08-19 16:06:37 -05:00
Slava Pestov
829107902e
compiler.tree.propagation: improved interval inference for absq eliminates a conditional from math.vectors:distance. Type inference for rational math also a bit sharper now
2009-08-19 02:33:41 -05:00
Slava Pestov
d7594c3381
compiler: inline singleton predicates, and optimize predicate engines, reduces terrain demo deployed size by ~20kb
2009-08-17 23:59:24 -05:00
Slava Pestov
3047d4a451
compiler.tree.propagation: remove method inlining heuristic
2009-08-17 22:29:05 -05:00
Slava Pestov
bf57d78b09
compiler.tree.modular-arithmetic: >fixnum elimination and value info annotations were too aggressive
2009-08-17 01:20:25 -05:00
Slava Pestov
5297be3e19
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
2009-08-15 18:42:41 -05:00
Doug Coleman
7c92ab1ea5
move if-zero etc to math, remove 1-/1+ from math
2009-08-14 14:27:23 -05:00
Doug Coleman
3f3d57032b
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places, minor refactoring
2009-08-13 19:21:44 -05:00
Slava Pestov
4ecf5a904a
More accurate wrap-interval in compiler.tree.propagation.info fixes test regression; constructing an interval with endpoints at infinity now outputs full-interval
2009-08-12 03:25:53 -05:00
Slava Pestov
422dd24bad
alien.complex: fix tests
2009-08-11 14:07:33 -05:00
Philipp Brüschweiler
26859a45eb
various doc fixes
2009-08-11 16:58:47 +02:00
Slava Pestov
7e35723db0
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
2009-08-10 01:16:49 -05:00
Slava Pestov
8a9c15ab0b
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
2009-08-09 16:29:21 -05:00
Slava Pestov
e400d80d8b
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'!
2009-08-08 23:03:45 -05:00
Slava Pestov
61ea749bb6
More accurate interval-mod and interval-rem
2009-08-08 22:01:12 -05:00
Slava Pestov
97ec3ea1b4
compiler.graphviz: add high-level IR call graph rendering
2009-08-05 03:33:06 -05:00
Slava Pestov
fb03a93763
compiler.tree.recursive: have to check tail call flag of call tree edges too
2009-08-05 02:14:49 -05:00
Slava Pestov
c3d60e5899
compiler.tree.recursive: more accurate loop detection
2009-08-04 19:18:40 -05:00
Slava Pestov
eed4f4dcfc
compiler.tree.recursive: add some more more loop detection tests
2009-08-04 16:23:14 -05:00
Slava Pestov
82c1106945
compiler.cfg.ssa.destruction: new implementation: simpler and more correct
2009-08-02 10:26:52 -05:00
Slava Pestov
e01fc93812
compiler.tree.propagation.call-effect: fix case where quotation inlining could enter an infinite loop: [ dup call( quot -- ) ] dup call( quot -- ) etc
2009-08-01 23:34:14 -05:00
Slava Pestov
501629cf75
compiler.tree.propagation.info: fix load error
2009-07-27 00:30:24 -05:00
Slava Pestov
fc41140720
compiler.cfg.utilities: move value-info utilities to compiler.tree.propagation.info
2009-07-26 21:10:33 -05:00
Slava Pestov
343151fd62
compiler.tree.finalization: undo a change that resulted in a compile time regression
2009-07-18 03:33:24 -05:00
Slava Pestov
5061db2a48
compiler.cfg: Move tail call optimization to the end, compiler.tree: simplify finalization pass because of this
2009-07-17 22:57:28 -05:00
Slava Pestov
1d735bc32d
compiler.tree.propagation.transforms: fix shift transform
2009-07-17 00:02:57 -05:00
Slava Pestov
3fb4fc1bde
Improve code generation for shift word: add intrinsics for fixnum-shift-fast in the case where the shift count is not constant, transform 1 swap shift into a more overflow check with open-coded fast case, transform bitand into fixnum-bitand in more cases
2009-07-16 23:50:48 -05:00
Slava Pestov
e76dce8aff
Overflowing fixnum intrinsics now expand into several CFG nodes. This speeds up the common case since only the uncommon case is now a stack syncpoint
2009-07-16 18:29:40 -05:00
Daniel Ehrenberg
062e33f8fb
fixing stupid bug in propagation
2009-07-16 00:43:54 -05:00
Daniel Ehrenberg
ee3e84a1f8
define-partial-eval framework in propagation pass makes it easy to add transforms; moving some transforms from stack checker to propagation, making them stronger
2009-07-16 00:34:50 -05:00
Daniel Ehrenberg
bb06facb01
new is inlined in the propagation pass when the class is known
2009-07-14 14:16:39 -05:00
Daniel Ehrenberg
47500fad06
call( and execute( inline known quotations/words in the propagation pass
2009-07-14 01:12:45 -05:00
Daniel Ehrenberg
4b29d13fda
Adding authors to compiler.tree.modular-arithmetic
2009-07-09 23:09:49 -05:00
Daniel Ehrenberg
cf3038b7d6
Improving modular arithmetic optimization to be aware of words like set-alien-unsigned-2
2009-07-09 23:07:38 -05:00
Slava Pestov
e0d84eb3a2
compiler.tree.propagation: better length propagation
2009-07-09 02:28:30 -05:00
Slava Pestov
0180209f4e
compiler.tree.dead-code: methods on flushable generics should be flushable
2009-07-03 21:31:26 -05:00
Slava Pestov
41f48e3cfe
compiler.tree.optimizer: Remove redundant call to compute-def-use
2009-07-01 17:41:20 -05:00
Slava Pestov
29327a787c
Remove initial-quot feature
2009-06-15 13:07:15 -05:00
Slava Pestov
285c8cecc6
Add some failing unit tests exposing bugs in initial-quot: implementation
2009-06-13 18:34:27 -05:00
Slava Pestov
9e987e8642
Merge branch 'master' into global_optimization
2009-06-01 03:12:32 -05:00
Slava Pestov
7b88756fd0
Add a with-scope so that optimize-tree doesn't pollute namespace
2009-05-27 18:58:54 -05:00