Joe Groff
cee5862b69
update a bunch of alien-callbacks and alien-indirects to use c-type words
2009-10-21 21:10:11 -05:00
Joe Groff
4dd44a007a
update some naked alien-invokes to use c-type words
2009-10-21 18:44:00 -05:00
Slava Pestov
a71212f9c4
cpu.x86.32: only create 16-byte parameter area if the word calls into the VM
2009-10-20 05:02:42 -05:00
Slava Pestov
9599d86ec5
compiler: FFI is now slightly more efficient when unboxing parameters, only changes data stack height once
2009-10-20 04:31:48 -05:00
Slava Pestov
6740956162
compiler.cfg: don't unbox the same value more than once per basic block
2009-10-01 19:41:23 -05:00
Slava Pestov
6079711ecb
hints: fix regression with declarations
2009-09-25 18:50:08 -05:00
Joe Groff
02b797f11b
struct classes now make their own C type without help from alien.structs. remove alien.structs dependencies from everywhere outside of alien and compiler, and have the FFI handle both alien.structs and classes.struct c-types
2009-09-15 17:38:49 -05:00
Slava Pestov
8c46388272
compiler.cfg.builder: don't run certain tests if float intrinsics are not available
2009-09-13 23:12:47 -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
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
009d3a87f6
Add some unit tests
2009-08-22 17:15:10 -05:00
Slava Pestov
552d069e9f
compiler: add unit tests for new bugs
2009-08-19 16:56:26 -05:00
Doug Coleman
d1ce837569
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
55d1b76ad7
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
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
cffd809ca0
compiler.cfg.stacks: more accurate deconcatenatization inserts fewer partially redundant ##peeks. 11% improvement on benchmark.beust2, 2% reduction in ##peek and ##replace instructions inserted
2009-08-03 07:08:28 -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
85975568d9
Debugging compiler.cfg.coalescing
2009-07-27 19:24:13 -05:00
Slava Pestov
f1eddf34c9
compiler.cfg: introduce less temporaries when building CFG
2009-07-24 03:37:18 -05:00
Slava Pestov
229d1c9f47
compiler.cfg.builder: fix stack effect declaration
2009-07-23 21:24:15 -05:00
Slava Pestov
c2c3d64d6d
compiler.cfg.stacks: now performs online local DCN
2009-07-23 20:54:38 -05:00
Slava Pestov
dcf7ce82a9
compiler.cfg.builder: Fix construction of ##return instructions from #return-recursive nodes
2009-07-22 19:17:21 -05:00
Slava Pestov
7c488f2b25
Insert _loop-entry in linearization pass instead of in CFG builder, so that optimizations don't have to worry about it
2009-07-22 06:05:17 -05:00
Slava Pestov
7139f55271
compiler.cfg: if a block has an instruction that kills values it must be the only instruction in the block
2009-07-19 20:12:04 -05:00
Slava Pestov
0a4fd0d400
compiler.cfg.builder: annotate calls with height changes, once again
2009-07-18 23:08:53 -05:00
Slava Pestov
f3be295a3c
compiler.cfg.builder: remove some dead code
2009-07-17 21:52:33 -05:00
Slava Pestov
99faf3c79f
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
Slava Pestov
1eae4286cd
compiler.cfg: split off condition codes into a comparisons sub-vocabulary
2009-07-13 14:42:52 -05:00
Slava Pestov
0963e6b73a
Merge branch 'master' of git://factorcode.org/git/factor
2009-06-30 23:07:36 -05:00
Slava Pestov
0837732c10
compiler.cfg.builder: emit less crap after a #terminate node
2009-06-30 23:03:25 -05:00
Doug Coleman
b82bea4004
Merge branch 'master' of git://factorcode.org/git/factor
2009-06-30 23:02:04 -05:00
Doug Coleman
ccd847083e
optimize fixnum*fast and fixnum-shift-fast
2009-06-30 23:01:44 -05:00
Slava Pestov
fa4f710095
compiler.cfg Remove height tracking for ##call instructions, wire in ##no-tco instruction
2009-06-30 21:21:46 -05:00
Slava Pestov
46a3608e3a
compiler.cfg.builder: fix stack effect
2009-06-30 21:07:55 -05:00
Slava Pestov
89fbc8efb4
compiler.cfg.tco: Tail call optimization moved out of compiler.cfg.builder into its own pass
2009-06-30 20:13:35 -05:00
Slava Pestov
7aca076408
GC checks now save and restore registers
2009-06-02 18:23:47 -05:00
Slava Pestov
40949800bf
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
531580ed30
compiler.cfg.builder: don't make basic blocks after terminating calls
2009-05-25 19:16:36 -05:00
Slava Pestov
873bb49849
Working on global optimizations
2009-05-19 17:28:13 -05:00
Slava Pestov
05f3f9dcb9
Fixing unit tests for stack effect inference changes
2009-04-20 21:15:19 -05:00
Slava Pestov
cddb1f6133
Fix spelling
2009-02-15 04:07:05 -06:00
Slava Pestov
34792a9f23
Remove >r/r>
2008-12-17 19:17:37 -06:00
Slava Pestov
1c0789e616
Didn't generate ##branch after ##alien-invoke and ##alien-indirect
2008-11-29 03:46:57 -06:00
Slava Pestov
f44506089d
More work on overflow instructions: don't need temp register anymore, add -tail variants which don't need stack frame
2008-11-28 06:36:30 -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
26f309d2ae
Trying to make PEGs compile faster by reducing the number of low level IR nodes: merge functionality of #>r and #r> into #shuffle, and generate 1 node instead of 3 for calls to get-local
2008-11-11 18:46:31 -06:00
sheeple
5b7d40d9b4
We need to end the basic block after the ##prologue in the dispatch branch so that the GC check can go after the prologue
2008-11-10 02:58:05 -06:00
Slava Pestov
4e55cd973b
If a #dispatch branch is a call to another word which is not an intrinsic, we avoid generating the dispatch branch and just jump to the word directly
2008-11-06 11:48:55 -06:00