Doug Coleman
b5fd809209
memq? -> member-eq?, sorted-memq? -> sorted-member-eq?
2009-10-28 15:02:00 -05:00
Joe Groff
218d5c7c07
value numbering rewrite rules for vector ops to convert "not and" to "andn" and "not andn" to "and"
2009-10-20 17:29:01 -05:00
Slava Pestov
0a3029d9f2
compiler: on PPC, ANDI, ORI and XORI instructions take an unsigned 16-bit immediate, unlike ADDI, SUBI and MULLI which take a signed 16-bit immediate. The code generator was not aware of this, and so for example '[ >fixnum -16 bitand ]' would generate incorrect code. Split up small-enough? hook into immediate-arithmetic? and immediate-bitwise? and update value numbering to be aware of this. Fixes classes.struct bitfields test failure
2009-10-19 04:58:29 -05:00
Joe Groff
5158a12d32
rename ##shuffle-vector to ##shuffle-vector-imm, and add a new ##shuffle-vector for dynamic shuffles. have vshuffle use ##shuffle-vector to do word and byte shuffles on x86
2009-10-09 21:26:27 -05:00
Daniel Ehrenberg
ab919bab96
Doing constant folding on ##neg and ##not in value numbering
2009-10-08 01:57:54 -05:00
Joe Groff
2d79729193
fix ##load-constant/##scalar>vector folding when constant is a fixnum
2009-10-07 12:46:08 -05:00
Slava Pestov
d47e99dbde
Fix compiler.cfg.value-numbering and math.matrices.simd unit tests
2009-10-02 02:32:35 -05:00
Joe Groff
9d424a1092
Merge branch 'master' of git://factorcode.org/git/factor
...
Conflicts:
basis/compiler/codegen/codegen.factor
2009-10-01 23:14:16 -05:00
Joe Groff
7b13fa4283
fold test-vector/branch sequences into a test-vector-branch instruction
2009-10-01 19:53:30 -05:00
Slava Pestov
785b9f2d43
compiler.cfg.value-numbering: fix overly-zealous ##compare-imm conversion
2009-09-30 05:09:20 -05:00
Slava Pestov
8e201ca4b7
Various minor compiler tweaks: Combine address calculation with dereferencing in alien accessors; convert SIMD XOR of a vector with itself into an XOR of the destination with itself; convert SIMD unbox of zero vector into XOR of the destination with itself; fix SIMD indexing on x86-64
2009-09-30 05:00:36 -05:00
Slava Pestov
ba3a06b745
compiler.cfg.value-numbering: add some more rewrite rules, neg/neg, not/not, and a few for SIMD
2009-09-30 02:18:29 -05:00
Joe Groff
025a5b7b15
split unordered and ordered float comparison intrinsics in compiler; generate only unordered comparisons for now
2009-09-08 17:04:26 -05:00
Slava Pestov
17821626c3
Fix conflicts
2009-09-07 23:51:25 -05:00
Slava Pestov
e20e9008ea
compiler.cfg.value-numbering: update tests for Joe's condition code changes
2009-09-04 03:11:56 -05:00
Slava Pestov
555543faae
compiler: tweak generated code
2009-09-04 03:01:18 -05:00
Slava Pestov
1f5193198b
compiler: clean up code generation for alien boxing/unboxing a bit
2009-09-03 21:22:43 -05:00
Slava Pestov
775b9af2f7
compiler: eliminate boilerplate by centralizing info in declarative INSN: syntax
2009-09-02 06:22:37 -05:00
Slava Pestov
f6a836d1e9
compiler.cfg.linear-scan now supports partial sync-points where all registers are spilled; taking advantage of this, there are new trigonometric intrinsics which yield a 2x performance boost on benchmark.struct-arrays and a 25% boost on benchmark.partial-sums
2009-08-30 04:52:01 -05:00
Slava Pestov
fa64522421
compiler.cfg.value-numbering: fix ##box-displaced-alien simplification
2009-08-28 19:05:49 -05:00
Slava Pestov
99bf9fadfb
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
9caf3f9248
compiler: new inline intrinsic for <displaced-alien> where the inputs have known types; value numbering now eliminates unnecessary allocation of displaced aliens if the result is immediately unboxed again
2009-08-27 00:06:19 -05:00
Slava Pestov
88d15dfbea
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.
2009-08-08 20:02:56 -05:00
Slava Pestov
2d575d7ec9
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
2009-08-08 04:02:18 -05:00
Slava Pestov
4921b819e0
compiler.cfg.representations: new pass to make global unboxing decisions, relies on new compiler.cfg.loop-detection pass for loop nesting information
2009-08-08 00:24:46 -05:00
Slava Pestov
4d2160799f
Split off the notion of a register representation from a register class
2009-08-07 17:44:50 -05:00
Slava Pestov
8028eb5776
compiler.cfg: clean up unit tests using some new utilities
2009-08-02 03:49:25 -05:00
Slava Pestov
ac7447483d
compiler.cfg.ssa.destruction: rename coalesce word to destruct-ssa
2009-07-28 12:56:33 -05:00
Slava Pestov
7a158d84da
compiler.cfg: Rename ssa to ssa.construction, coalescing to ssa.destruction
2009-07-28 09:34:08 -05:00
Slava Pestov
905f52d4a9
compiler.cfg: Fix some unit tests
2009-07-28 08:56:14 -05:00
Slava Pestov
d8836f8927
compiler.cfg: Fixing test failures
2009-07-24 06:08:07 -05:00
Slava Pestov
c49d2cc7bc
compiler.cfg.value-numbering: insert ##copy instructions for instructions whose expressions simplify. While subsequent usages are replaced with the instruction computing the simplified vreg locally, global usages may exist of the original instruction. In this case, the ##copy is not dead
2009-07-24 05:30:30 -05:00
Slava Pestov
5d9f7b0ed2
compiler.cfg: Major restructuring -- do not compute liveness before local optimization, and instead change local optimizations to be more permissive of undefined values. Now, liveness is only computed once, after phi elimination and before register allocation. This means liveness analysis does not need to take phi nodes into account and can now use the new compiler.cfg.dataflow-analysis framework
2009-07-22 03:08:28 -05:00
Slava Pestov
2e07fcdd6d
compiler.cfg: Fix unit tests
2009-07-21 22:25:19 -05:00
Slava Pestov
704e417087
Merge branch 'master' of git://factorcode.org/git/factor
2009-07-17 00:03:13 -05:00
Slava Pestov
39a70db831
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
Daniel Ehrenberg
9ae962ded6
Phi elimination doesn't have the swap problem now
2009-07-16 22:42:13 -05:00
Slava Pestov
bff5a44c70
compiler.cfg: Fix regressions from recent changes
2009-07-14 20:43:06 -05:00
Slava Pestov
b65ef327ce
compiler.cfg.value-numbering: merge in compiler.cfg.branch-folding
2009-07-14 20:05:01 -05:00
Slava Pestov
bea69ea325
compiler.cfg.value-numbering: branch folding
2009-07-14 19:17:12 -05:00
Slava Pestov
2e6ae2153c
compiler.cfg.value-numbering: more optimizations
2009-07-14 16:05:25 -05:00
Slava Pestov
1e8e24946c
compiler.cfg.value-numbering: add some unit tests
2009-07-14 13:25:07 -05:00
Slava Pestov
a17293a828
compiler.cfg: update unit tests for compiler.cfg.comparisons
2009-07-14 12:06:55 -05:00
Slava Pestov
dff25199cb
Merge branch 'master' of git://factorcode.org/git/factor
2009-07-13 22:59:19 -05:00
Doug Coleman
83d8c8606d
clean up value numbering conversion of ##add/sub to ##add/sub-imm
2009-07-13 19:02:05 -05:00
Slava Pestov
1eae4286cd
compiler.cfg: split off condition codes into a comparisons sub-vocabulary
2009-07-13 14:42:52 -05:00
Slava Pestov
eda950a3bf
compiler.cfg.value-numbering: fix ##compare and ##compare-branch rewrites
2009-07-13 12:33:58 -05:00
Slava Pestov
fe32e13fb0
compiler.cfg.value-numbering: factor out value renaming into a separate compiler.cfg.renaming vocabulary
2009-07-09 23:14:26 -05:00
Slava Pestov
3d7addbbf5
compiler.cfg.value-numbering.rewrite: disable ##compare optimizations for now
2009-07-04 03:26:37 -05:00
Slava Pestov
577a3cb968
compiler.cfg.value-numbering.rewrite: fix ##compare-imm rewrite rule
2009-07-04 02:50:50 -05:00