Commit Graph

389 Commits

Author SHA1 Message Date
Vincent St-Amour
fc29e7e856 Added mutable pair optimizations. 2010-07-16 12:22:16 -04:00
Vincent St-Amour
f21454e711 Fixed an infinite loop. 2010-07-16 12:22:16 -04:00
Vincent St-Amour
c587038b33 The imaginary parts of reals are ignored when doing complex division. 2010-07-16 12:22:15 -04:00
Vincent St-Amour
443d8b9f91 Fixnums and integers can now be coerced for complex operations. 2010-07-16 12:22:15 -04:00
Vincent St-Amour
c645aa7ebc The imaginary parts of inexact reals are ignored when doing complex multiplication. 2010-07-16 12:22:15 -04:00
Vincent St-Amour
b0788372ea Fixed bugs in the tests. 2010-07-16 12:22:14 -04:00
Vincent St-Amour
566aeedb59 Better error reporting by the optimizer's test harness. 2010-07-16 12:22:14 -04:00
Vincent St-Amour
7fb1b41a28 The optimizer's test harness now makes sure that optimized and
non-optimized versions of the same code evaluate to the same thing.

Unfortunately, this leads to a lot of code duplication. We can't
abstract over optimization like we do for the benchmarks since the
wrapper module would interfere with testing expanded code for
equality.
2010-07-16 12:22:14 -04:00
Vincent St-Amour
748e9e47ad The imaginary parts of inexact reals are ignored when doing complex
addition or subtraction.
2010-07-16 12:22:13 -04:00
Vincent St-Amour
025af5b815 Added coercions for floats with unboxed complex operations.
However, this generates superfluous operations involving their
imaginary part of 0.
2010-07-16 12:22:13 -04:00
Vincent St-Amour
fff71e6a1d Enabled optimization of complex conjugate at the top level of complex operations. 2010-07-16 12:22:12 -04:00
Vincent St-Amour
063211d922 Added unboxed complex conjugate. 2010-07-16 12:22:12 -04:00
Vincent St-Amour
0b0da84eba Added optimizations for iterating over vectors and strings. 2010-07-16 12:22:12 -04:00
Vincent St-Amour
1e550139aa Added dead code elimination. 2010-07-16 12:22:11 -04:00
Vincent St-Amour
4e6fc3154b Added a test for cross-module struct optimization. 2010-07-16 12:22:10 -04:00
Vincent St-Amour
7853d33349 Improved unboxed complex operations.
Intermediate results are kept as unboxed floats as long as we stay
within complex arithmetic code.
2010-07-07 19:42:56 -04:00
Vincent St-Amour
7921074eef Avoid boxing intermediate results when doing multiple complex
operations in a row.

However, because of values and let-values, we lose float unboxing.
If we have a single complex operation, this is much slower than my
previous implementation (though still faster than generic
operations). With 2 complex operations, the new implementation becomes
faster.
2010-07-07 19:42:55 -04:00
Vincent St-Amour
de52d2ce9f Avoided duplicate computation in inexact complex division. 2010-07-07 19:42:55 -04:00
Vincent St-Amour
3fb69bc764 Generic inexact complex arithmetic operations are now replaced with
the right combinations of unsafe float operations.
2010-07-07 19:42:54 -04:00
Vincent St-Amour
e52d63ee68 Added an optimization for vector-length of known-length vectors. 2010-07-07 19:42:54 -04:00
Vincent St-Amour
389a20795a Added support for make-flrectangular, flreal-part, flimag-part and
their unsafe counterparts to Typed Scheme and its optimizer.
2010-07-02 20:58:30 -04:00
Vincent St-Amour
556734a223 Added coercion of fixnums to floats to the optimizer. 2010-07-02 20:58:29 -04:00
Vincent St-Amour
e8a0a26c2f Changed the optimizer's test harness to ignore type tables. 2010-07-02 20:58:29 -04:00
Vincent St-Amour
a6d11a1df0 Added struct optimizations. 2010-07-02 20:58:28 -04:00
Sam Tobin-Hochstadt
e989631d56 Add flags for running the optimizer tests and compiling the benchmarks 2010-07-02 19:00:57 -04:00
Sam Tobin-Hochstadt
0e400291e7 Fix inference for heterogenous vectors. 2010-07-02 17:25:07 -04:00
Sam Tobin-Hochstadt
570df7d665 Generalize fixed-length lists to listofs.
Closes PR10057.
2010-07-02 17:25:07 -04:00
Vincent St-Amour
458b6b65c9 Added optimization when iterating over lists. 2010-07-02 15:48:06 -04:00
Vincent St-Amour
1886572906 Added support for the 2 versions of optimizer tests to be written in
different languages.
2010-07-02 15:48:05 -04:00
Vincent St-Amour
f6077b02f1 Fixed some tests that used to test for an invalid optimization that is
now valid.
2010-07-02 15:48:04 -04:00
Vincent St-Amour
8c25e46141 Literal vectors are now given HeterogenousVector types to preserve
length information.
2010-07-02 15:48:00 -04:00
Vincent St-Amour
25cb5ef568 Fixed some tests to reflect changes to the optimizer. 2010-07-02 15:47:59 -04:00
Vincent St-Amour
351de3f767 Fixed the behavior of the optimizer on sqrt. 2010-07-02 15:47:58 -04:00
Vincent St-Amour
816cc75654 Fixed tests for invalid optimizations to actually test something. 2010-07-02 15:47:57 -04:00
Vincent St-Amour
636fca1a83 Generalization is now done on vector types. 2010-07-02 15:16:11 -04:00
Sam Tobin-Hochstadt
71bb63c128 Better typing for `make-sequence'. 2010-07-01 17:12:59 -04:00
Sam Tobin-Hochstadt
3d347f117b Add --just flag for running tests. 2010-07-01 13:47:02 -04:00
Sam Tobin-Hochstadt
4f3e3625b3 Fix error spec for this test. 2010-07-01 13:45:52 -04:00
Sam Tobin-Hochstadt
75bd26d326 Better error message for multiple ->
Closes PR 10493.
2010-07-01 11:35:21 -04:00
Vincent St-Amour
62a15df3eb Added the Nonnegative-Float type. 2010-06-30 14:53:22 -04:00
Vincent St-Amour
dcfb2d8a94 Added the Inexact-Complex type. 2010-06-30 14:53:21 -04:00
Vincent St-Amour
ef576e27c5 Fixed the type of min and max to only operate on reals. 2010-06-30 14:53:20 -04:00
Vincent St-Amour
dfafc0b295 Added fixnum optimizations. 2010-06-30 14:53:18 -04:00
Sam Tobin-Hochstadt
c01b239779 Refactor struct type representation.
- fields now represented by fld struct.
 - mutability on per-field basis
 - accessors are per field

This fixes lots of existing bugs, allows future #:mutable on fields.
2010-06-29 17:33:36 -04:00
Vincent St-Amour
28acece484 Fixed Typed Scheme's optimizer's test harness to work with drdr. 2010-06-25 13:25:42 -04:00
Vincent St-Amour
b345d5f0f0 Typed Scheme now optimizes (fl)vector-length for all vectors and
vector-(ref,set!) for vectors of known length.
2010-06-25 11:00:24 -04:00
Vincent St-Amour
fd987546b3 Wrote a test harness and a couple of tests for Typed Scheme's optimizer. 2010-06-25 11:00:23 -04:00
Sam Tobin-Hochstadt
4b1c62c978 Add Fixnum type. 2010-06-24 18:05:55 -04:00
Sam Tobin-Hochstadt
5b1118d514 More options for test runner. 2010-06-24 16:46:31 -04:00
Sam Tobin-Hochstadt
3c8952d63d Use the correct field numbers in substructs.
Maintain table of struct accessors/mutators.
2010-06-24 14:53:38 -04:00