Joe Groff
3bc097f6ff
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
2db25b937e
Doing constant folding on ##neg and ##not in value numbering
2009-10-08 01:57:54 -05:00
Joe Groff
47cfb7d3a5
fix ##load-constant/##scalar>vector folding when constant is a fixnum
2009-10-07 12:46:08 -05:00
Slava Pestov
cb71fbf4fe
Fix compiler.cfg.value-numbering and math.matrices.simd unit tests
2009-10-02 02:32:35 -05:00
Joe Groff
53b265f682
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
f9695951a0
fold test-vector/branch sequences into a test-vector-branch instruction
2009-10-01 19:53:30 -05:00
Slava Pestov
b677822b76
compiler.cfg.value-numbering: fix overly-zealous ##compare-imm conversion
2009-09-30 05:09:20 -05:00
Slava Pestov
cdc7b7e2c7
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
1da18d06b1
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
0ea9949e51
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
7c04b912bb
compiler.cfg.value-numbering: update tests for Joe's condition code changes
2009-09-04 03:11:56 -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
f662e6403a
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
d0c393aa60
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
4b7ba38aab
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
725280d424
Split off the notion of a register representation from a register class
2009-08-07 17:44:50 -05:00
Slava Pestov
e1c7f7394a
compiler.cfg: clean up unit tests using some new utilities
2009-08-02 03:49:25 -05:00
Slava Pestov
9afa39aa3a
compiler.cfg.ssa.destruction: rename coalesce word to destruct-ssa
2009-07-28 12:56:33 -05:00
Slava Pestov
d10993b837
compiler.cfg: Rename ssa to ssa.construction, coalescing to ssa.destruction
2009-07-28 09:34:08 -05:00
Slava Pestov
80e10f1bd0
compiler.cfg: Fix some unit tests
2009-07-28 08:56:14 -05:00
Slava Pestov
13c3fdcb5c
compiler.cfg: Fixing test failures
2009-07-24 06:08:07 -05:00
Slava Pestov
21a012e3d7
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
1aa6c9a0d5
compiler.cfg: Fix unit tests
2009-07-21 22:25:19 -05:00
Daniel Ehrenberg
8477cf8e91
Phi elimination doesn't have the swap problem now
2009-07-16 22:42:13 -05:00
Slava Pestov
ebcd0dc252
compiler.cfg: Fix regressions from recent changes
2009-07-14 20:43:06 -05:00
Slava Pestov
11731f8d48
compiler.cfg.value-numbering: merge in compiler.cfg.branch-folding
2009-07-14 20:05:01 -05:00
Slava Pestov
73a2222541
compiler.cfg.value-numbering: branch folding
2009-07-14 19:17:12 -05:00
Slava Pestov
2ace87370e
compiler.cfg.value-numbering: more optimizations
2009-07-14 16:05:25 -05:00
Slava Pestov
d1eea090b6
compiler.cfg.value-numbering: add some unit tests
2009-07-14 13:25:07 -05:00
Slava Pestov
c860a3b1e6
compiler.cfg: update unit tests for compiler.cfg.comparisons
2009-07-14 12:06:55 -05:00
Slava Pestov
76d74c16af
Fixing various bugs; alias analysis wasn't handling ##phi nodes, stack analysis incorrectly handled height-changing back edges and ##fixnum-*, clean up ##dispatch generation
2009-05-29 01:39:14 -05:00
Slava Pestov
117cb78d6b
Fixing local optimizations
2009-05-27 18:58:41 -05:00
Slava Pestov
1db81da264
Refactoring low-level optimizer to support stack analysis pass
2009-05-26 19:31:19 -05:00
Slava Pestov
7f766ab355
Update compiler tests for tag number changes
2009-04-28 21:43:30 -05:00
Slava Pestov
44bfff7c7b
Rename ##load-indirect to ##load-reference since this is more descriptive; value numbering doesn't assign expressions to ##load-reference nodes since this would end up folding literals which were eq? but not =
2009-01-29 01:44:58 -06:00
Slava Pestov
4f0a9f311e
Untangling some dependencies
2008-12-08 14:58:00 -06:00
Slava Pestov
ab689c098b
Clean up direct literal code and make a first attempt at PowerPC support
2008-11-24 08:16:14 -06:00
Slava Pestov
eb05dd3a12
Optimize a ##dispatch that is applied to the result of a ##sub-imm or ##add-imm; this eliminates an instruction from the common 1 fixnum-fast { ... } dispatch and 8 fixnum-fast { ... } dispatch code sequences appearing in generic word expansions
2008-11-13 04:16:08 -06:00
Slava Pestov
64cbf619a9
Add more algebraic simplifications: comparison of a comparison, comparison where first is immediate
2008-11-06 09:27:52 -06:00
Slava Pestov
885adc8dc9
Various improvements
2008-10-23 05:27:54 -05:00
Slava Pestov
52967c5bf1
Improved value numbering
2008-10-23 02:49:26 -05:00
Slava Pestov
d723b69990
Value numbering
2008-10-22 21:59:07 -05:00