Daniel Ehrenberg
416707f327
Fixing optimization for improved method inlining
2010-05-04 16:46:07 -05:00
Daniel Ehrenberg
02bd3d7142
splitting generic word callsites when only one method is applicable
2010-05-04 16:46:07 -05:00
Daniel Ehrenberg
750a96935f
instance? optimizes null checks
2010-05-04 16:46:07 -05:00
Daniel Ehrenberg
24ad579631
Merge branch 'master' of git://factorcode.org/git/factor
2010-05-04 09:52:34 -05:00
Daniel Ehrenberg
4f66732c36
Fixing scheduling for compiler changes
2010-05-04 09:48:16 -05:00
Slava Pestov
035a2e9b63
compiler: more tests
2010-05-04 05:46:45 -05:00
Slava Pestov
572d7f77f8
compiler.cfg.value-numbering: don't use complex addressing modes unless architecture supports it
2010-05-04 05:46:21 -05:00
Slava Pestov
dd2a4c2c77
cpu.x86: GC root offsets were computed wrong in words containing alien calls
2010-05-04 02:53:53 -04:00
Slava Pestov
ea4ee4ff60
compiler.tests: remove useless test from float tests; min and max are generic now, with methods on floats, so any potential inconsistency is gone
2010-05-04 00:07:53 -04:00
Slava Pestov
ad69052a1a
compiler.cfg.value-numbering: fix typo in unit test
2010-05-03 22:11:29 -04:00
Daniel Ehrenberg
b02208ceb2
Some fixes to merge scheduling
2010-05-03 17:54:46 -05:00
Daniel Ehrenberg
277705345f
Merge branch 'master' of git://factorcode.org/git/factor into s3
...
Conflicts:
basis/compiler/cfg/finalization/finalization.factor
2010-05-03 17:29:03 -05:00
Slava Pestov
4352902bb6
compiler.cfg.empty-blocks: remove unused pass
2010-05-03 18:23:54 -04:00
Slava Pestov
ca4f442eaa
compiler.cfg.alias-analysis: storing a reference into an object now merges the reference's alias class with the heap alias class
2010-05-03 18:20:28 -04:00
Daniel Ehrenberg
5509604ffe
Merge branch 'master' into s3
...
Conflicts:
basis/compiler/cfg/optimizer/optimizer.factor
2010-05-03 17:19:28 -05:00
Slava Pestov
58e4381eb1
compiler: new "binary literal area" at the end of a word's machine code stores constant floats and SIMD vectors; this allows ##load-reference/##load-memory fusion to be performed on x86-64, with a RIP-relative address reaching the data; also simplifies VM since custom relocation types used by the previous 32-bit-only optimization are no longer needed
2010-05-03 17:34:35 -04:00
Slava Pestov
9b4135713e
compiler.cfg.representations: make sure that immediate operands fit
2010-05-03 17:34:34 -04:00
Slava Pestov
86548320eb
compiler.cfg.value-numbering: fix unit test for 64-bit
2010-05-03 17:34:33 -04:00
Slava Pestov
f5c5d8b44c
compiler: remove flat machine representation and generate code directly from the CFG
2010-05-03 17:34:32 -04:00
Slava Pestov
5236f327ba
compiler.cfg.debugger: add ssa. word to print IR before representation selection runs
2010-05-03 17:34:31 -04:00
Slava Pestov
0fbf454b18
compiler.tree.propagation: fix both-fixnums? trick
2010-05-03 17:34:30 -04:00
Slava Pestov
7f6ae34d72
Updating tests for recent compiler changes
2010-05-03 17:34:30 -04:00
Slava Pestov
38bafd2be8
compiler.cfg.linear-scan.assignment: spill slot representation logic was backwards, just like Factor
2010-05-03 17:34:29 -04:00
Slava Pestov
428ba9fd0f
compiler.cfg: fuse ##load-integer/##load-reference into ##replace to form ##replace-imm
2010-05-03 17:34:28 -04:00
Slava Pestov
9788323d25
compiler: add ##load-vector instruction to avoid wasting a temporary register on x86-32
2010-05-03 17:34:28 -04:00
Slava Pestov
5979fe7f41
compiler.cfg.copy-prop: optimistic copy propagation
2010-05-03 17:34:26 -04:00
Slava Pestov
e90712b1ed
compiler.cfg: cleanup
2010-05-03 17:34:26 -04:00
Slava Pestov
df86d1341f
compiler.cfg: clean up ##phi literals in tests
2010-05-03 17:34:24 -04:00
Slava Pestov
ffd1844d52
compiler.cfg.linear-scan: clean up spill slot assignment
2010-05-03 17:34:24 -04:00
Slava Pestov
65f86bfce7
compiler.cfg.ssa.detruction: coalesce different representations in more cases
2010-05-03 17:34:22 -04:00
Slava Pestov
ce73031ec3
compiler.cfg.alias-analysis: write unit tests and fix redundant store elimination
2010-05-03 17:34:22 -04:00
Slava Pestov
33eb15bf44
compiler.cfg.debugger: clean up and make it more flexible
2010-05-03 17:34:22 -04:00
Slava Pestov
43f269e4eb
Register allocation now uses SSA properties to coalesce values with different representations
2010-05-03 17:34:20 -04:00
Slava Pestov
9b34a4a054
compiler.cfg: remove unused 'reps' slot from compiler.cfg, and re-organize things in preparation for SSA register allocation
2010-05-03 17:34:18 -04:00
Slava Pestov
43fc230c69
compiler.cfg.linear-scan: cleanups
2010-05-03 17:34:18 -04:00
Slava Pestov
d23bb19b55
Code cleanups
2010-05-03 17:34:17 -04:00
Slava Pestov
c55a6bb385
compiler.cfg.gc-checks: move phi instructions into GC check block, to ensure correct behavior
2010-05-03 17:34:17 -04:00
Slava Pestov
95ff5ffe51
New GC checks work in progress
2010-05-03 17:34:16 -04:00
Slava Pestov
4d749c9dfe
compiler.tree.propagation: fix tests
2010-05-03 17:34:14 -04:00
Slava Pestov
9c44dddf97
compiler.codegen: cleanup
2010-05-03 17:34:14 -04:00
Slava Pestov
db7403d697
compiler.cfg.linear-scan.resolve: fix incorrect behavior when one physical register is used with several representations in the same register class
2010-05-03 17:34:14 -04:00
Slava Pestov
51b13ce373
compiler.cfg.linear-scan: don't insert a _reload if the register is going to be overwritten anyway
2010-05-03 17:34:14 -04:00
Slava Pestov
a9ccfa8f05
strings: move string-nth primitive out of the VM and into the library
2010-05-03 17:34:12 -04:00
Slava Pestov
458fd007be
compiler.cfg.representations: simplify a little
2010-05-03 17:34:11 -04:00
Slava Pestov
ed8c32989f
compiler.cfg.representations: add peephole optimizations for integer comparisons
2010-05-03 17:34:11 -04:00
Slava Pestov
0f5d9974a0
compiler.cfg.representations: fix various bugs
2010-05-03 17:34:11 -04:00
Slava Pestov
456743a6ce
compiler.cfg.representations: add more peephole optimizations to reduce fixnum tagging and untagging overhead
2010-05-03 17:34:11 -04:00
Slava Pestov
a141df595b
compiler.cfg.value-numbering: more cleanups
2010-05-03 17:34:10 -04:00
Slava Pestov
ef8094e3b3
compiler.cfg.value-numbering: identify VNs with their representative vregs, eliminating the vn>vreg hash
2010-05-03 17:34:10 -04:00
Slava Pestov
edaf59bf46
compiler.cfg.value-numbering: maintain a VN to instruction mapping. This eliminates all instances of expression inspection, allowing the auto-generated expression classes to be removed
2010-05-03 17:34:09 -04:00
Slava Pestov
f548a08637
compiler.cfg.value-numbering: remove constant -vs- literal distinction
2010-05-03 17:34:09 -04:00
Slava Pestov
9cea3f2c93
compiler.cfg.ssa.liveness: remove unused pass
2010-05-03 17:34:08 -04:00
Slava Pestov
732f57f31d
compiler.cfg.builder: fix unit tests
2010-05-03 17:34:08 -04:00
Slava Pestov
f14f2cbdab
compiler.cfg.value-numbering: merge 'simplify' pass into 'rewrite'
2010-05-03 17:34:08 -04:00
Slava Pestov
378c2b2a46
compiler.cfg: add ##load-memory and ##store-memory instructions implementing complex addressing modes, and associated value numbering optimizations
2010-05-03 17:34:07 -04:00
Slava Pestov
b8d556514c
compiler.cfg.value-numbering: add slot addressing rewrite rule to eliminate a redundant ##add-imm from array-nth and set-array-nth
2010-05-03 17:34:07 -04:00
Slava Pestov
2475699736
compiler.cfg: more flexible addressing for ##slot and ##set-slot
2010-05-03 17:34:06 -04:00
Slava Pestov
913b95192e
compiler.cfg: merge all alien accessors into ##load-memory-imm and ##store-memory-imm
2010-05-03 17:34:06 -04:00
Slava Pestov
279eb461b1
compiler.cfg: remove ##set-string-nth-fast instruction since it can be expressed just as efficiently using other instructions
2010-05-03 17:34:04 -04:00
Slava Pestov
c81063614b
compiler.tests.low-level-ir: update for recent changes
2010-05-03 17:34:04 -04:00
Slava Pestov
efd2a80d98
compiler.cfg.value-numbering: fix compile error
2010-05-03 17:34:04 -04:00
Slava Pestov
e95cd256ec
compiler.cfg.representations: peephole optimizations are used to simplify the case where the input to a ##shl-imm or ##sar-imm needs to be untagged
2010-05-03 17:34:03 -04:00
Slava Pestov
2ce926594d
compiler.cfg.value-numbering: new optimizations; reassociation for shifts and redistribution for shifts/multiplies over additions/subtractions
2010-05-03 17:34:02 -04:00
Slava Pestov
2ca8d543f1
compiler.cfg.instructions: more typos
2010-05-03 17:34:02 -04:00
Slava Pestov
82fb1879af
Debugging untagged fixnums
2010-05-03 17:34:02 -04:00
Slava Pestov
5d3a7a7362
Untagged fixnums work in progress
2010-05-03 17:34:02 -04:00
Slava Pestov
503c0fcfde
compiler: Start using tagged-rep for stuff, and split up compiler.cfg.representations into several sub-vocabularies
2010-05-03 17:34:01 -04:00
Erik Charlebois
baab8c060d
Remove ENUM: f and replace uses with CONSTANTs.
...
Fix bootstrap and load-all errors from enum classes.
2010-04-19 20:08:40 -07:00
Joe Groff
4bc915d526
C-ENUM: -> ENUM:
2010-04-19 20:07:16 -07:00
Slava Pestov
d143aa64b2
compiler.tree.propagation.transforms: open-code >fixnum when input is already a fixnum or f
2010-04-19 01:14:00 -05:00
Slava Pestov
2517b2fc2b
compiler: combine ##load-constant followed by ##alien-double into a ##load-double on x86-32, saving an integer register
2010-04-18 21:42:45 -05:00
Slava Pestov
8f0739197e
compiler.cfg: fix some bugs introduced by the ##compare-imm fusion patch
2010-04-18 21:42:45 -05:00
Slava Pestov
bc9241d2b7
compiler.tree.propagation.recursive: more fine-grained generalize-counter-interval eliminates overflow checks from binary-search
2010-04-18 21:42:45 -05:00
Slava Pestov
2aaf24412a
compiler: change how 'f' is represented in low level IR to simplify some code, and fuse a ##load-constant of a word with a ##compare into a ##compare-imm on x86-32. This eliminates a spill from binary-search
2010-04-18 21:42:45 -05:00
Daniel Ehrenberg
fbb1eb98a9
Improving dependence graph correctness
2010-04-18 19:59:52 -05:00
Daniel Ehrenberg
865285cdd7
Merge branch 'master' of git://factorcode.org/git/factor into s3
2010-04-17 14:05:40 -05:00
Slava Pestov
c1a870fe72
sequences: remove stupid <flat-slice> word
2010-04-17 00:58:30 -05:00
Daniel Ehrenberg
6892bac1ca
Making some scheduling assertions only run in unit tests
2010-04-15 17:36:43 -05:00
Daniel Ehrenberg
74de7d0e2a
Merge branch 'master' of git://factorcode.org/git/factor into s3
2010-04-15 17:28:53 -05:00
Slava Pestov
bd4e920995
compiler.tree.propagation: fix scalability issue with constraints
2010-04-14 17:19:26 -07:00
Slava Pestov
4f16212840
compiler.tests.redefine23: test wasn't testing anything
2010-04-13 00:56:48 -07:00
Slava Pestov
88f627a402
compiler.tests.alien: fix tests on Win64
2010-04-13 01:24:04 -05:00
Slava Pestov
918b202b9a
compiler.tests.alien: get it passing when VM is compiled with MINGW by disabling certain tests and using the MINGW ABI for others, and fix fastcall alien-indirect tests for name decoration
2010-04-12 18:14:18 -05:00
Slava Pestov
67e24b1d2a
compiler.codegen: need to do name decoration with fastcall as well
2010-04-12 18:10:25 -05:00
Slava Pestov
1434a305c8
vm: add a new rc-absolute-1 relocation class to allow storing values in 8-bit operands, and optimized code sequences for inline caches using this
2010-04-12 14:22:41 -07:00
Slava Pestov
145e6428ba
Fixing load errors
2010-04-10 17:24:44 -07:00
Slava Pestov
0aab7aa872
compiler.tests.alien: fix typo
2010-04-10 00:41:20 -07:00
Joe Groff
3e0d86f355
Merge branch 'master' of git://factorcode.org/git/factor into abi-symbols
...
Conflicts:
basis/compiler/tests/alien.factor
2010-04-06 12:30:15 -07:00
Daniel Ehrenberg
aae69daa96
Fixing USING: line of scheduling to remove unnecessary vocabs
2010-04-05 15:45:06 -05:00
Daniel Ehrenberg
e22f66daf4
Scheduling has to come before representation selection, since the latter inserts memory operations
2010-04-05 00:24:12 -05:00
Daniel Ehrenberg
601b6f8457
Merge branch 'master' of git://factorcode.org/git/factor into s3
2010-04-04 19:43:15 -05:00
Slava Pestov
74640b7f71
Get green threads working on Windows
...
- store stack base and limit in TIB
- set up a frame-based structured exception handler in each context's callstack
- boot.x86.32.image has now been replaced by boot.winnt-x86.32.image and boot.unix-x86.32.image
2010-04-03 20:24:33 -04:00
Joe Groff
1c5f718e80
add tests for fastcall callbacks
2010-04-02 00:23:39 -07:00
Joe Groff
47f3ace5ac
test fastcall indirect struct return
2010-04-02 00:00:34 -07:00
Joe Groff
43d73dcd4d
remove fastcall struct param tests because GCC appears to behave differently from VC++ here and again, who cares
2010-04-01 23:54:08 -07:00
Joe Groff
5dcfb383a6
add tests for struct returns from fastcall
2010-04-01 23:52:56 -07:00
Joe Groff
69abcd4b9b
test indirect fastcalls
2010-04-01 23:43:55 -07:00
Joe Groff
fd0569e553
compiler.tests.alien: add back fastcall float and struct tests
2010-04-01 22:47:16 -07:00
Joe Groff
88fbcba067
flatten non-integral types to (stack-value) on x86.32
2010-04-01 20:56:43 -07:00
Joe Groff
88da92543c
add a test that multiple stdcalls or fastcalls in the same word behave correctly
2010-04-01 18:48:12 -07:00
Joe Groff
553b9fcd93
make "fastcall" symbol private since it doesn't really work in all cases
2010-04-01 18:34:15 -07:00
Joe Groff
9c1a9158be
retire mixed int/float fastcall tests because who cares
2010-04-01 18:25:56 -07:00
Slava Pestov
eceabbc57e
compiler: new set-special-object intrinsic; more efficient special-object intrinsic
2010-04-01 20:09:14 -04:00
Joe Groff
c743608456
check gc after fastcall ffi tests like stdcall tests
2010-04-01 14:15:34 -07:00
Joe Groff
a191937c47
typos in ffi tests
2010-04-01 03:02:36 -07:00
Joe Groff
4fd61f0b5c
cpu.architecture: alter param-regs to take abi as an (ignored for now) argument
2010-04-01 02:53:40 -07:00
Joe Groff
fca8ba3d0a
add fastcall functions to ffi tests
2010-04-01 02:22:42 -07:00
Joe Groff
f3dd625de6
"stdcall" -> stdcall
2010-03-31 19:29:04 -07:00
Joe Groff
65c3259761
"cdecl" -> cdecl
2010-03-31 19:20:35 -07:00
Slava Pestov
d98e752199
compiler: add intrinsic for context-object primitive
2010-03-27 02:56:11 -04:00
Slava Pestov
e6a15c0b33
compiler.tree.propagation: don't constant-fold boa constructors of identity-tuple subclasses
2010-03-26 22:44:56 -04:00
Slava Pestov
560c119cd2
vm: actually use context callstacks when running code
2010-03-26 22:44:43 -04:00
Daniel Ehrenberg
31f23c8eba
Scheduling uses sets where appropriate
2010-03-24 10:38:52 -04:00
Daniel Ehrenberg
12db8a6c77
Merge branch 's3' of git://github.com/littledan/Factor into s3
2010-03-23 16:46:28 -04:00
Joe Groff
1d4d6f4ce8
factor code duplication in compiler.cfg.intrinsics.simd.backend
2010-03-20 10:57:04 -07:00
Joe Groff
f82a368602
compiler.cfg.intrinsics.simd.backend: eliminate duplicated work done on successful insn sequence
2010-03-20 02:51:49 -07:00
Joe Groff
ee4913702f
compiler.cfg.intrinsics.simd.backend: use less grotesque metaprogramming to determine simd instruction sequences
2010-03-20 02:16:50 -07:00
Slava Pestov
6aee6b3adc
Add context-specific special object table, generalizing catchstack_save and current_callback_save fields of context struct
2010-03-18 22:06:00 +13:00
Daniel Ehrenberg
248730d39f
Cleaning up compiler.cfg.ssa.construction
2010-03-17 20:12:10 -04:00
Daniel Ehrenberg
512fe14e4e
Merge branch 'bags' of git://github.com/littledan/Factor
...
Conflicts:
basis/compiler/cfg/ssa/construction/tdmsc/tdmsc.factor
basis/furnace/auth/auth.factor
basis/stack-checker/backend/backend.factor
2010-03-16 13:28:00 -04:00
Joe Groff
f24a74f66c
Merge branch 'master' into row-polymorphism
2010-03-10 11:48:41 -08:00
Slava Pestov
7744559a46
compiler.tree.propagation: clean up
2010-03-10 15:15:49 +13:00
Daniel Ehrenberg
8e227bc874
Propagation tracks length just like any other read-only slot
2010-03-09 15:58:44 -05:00
Joe Groff
bcbc7632c6
fix stack effects in compiler tests
2010-03-08 23:46:20 -08:00
Joe Groff
191ac353fd
generalize stack effects so we can bootstrap with the stricter stack effect checking
2010-03-08 23:38:10 -08:00
Joe Groff
af57d4dfa9
fix ... in compiler.cfg.linearization
2010-03-05 14:27:58 -08:00
Joe Groff
a3033e885a
make effect variables part of effect syntax, stored out of band in effect tuple
2010-03-05 13:30:10 -08:00
Daniel Ehrenberg
e3481a7ed7
compiler.cfg.def-use uses sets
2010-03-02 19:23:34 -05:00
Daniel Ehrenberg
1e5f202998
Maing vocabs.hierarchy use sets; modifying alias analysis's use of sets
2010-02-28 22:55:22 -05:00
Daniel Ehrenberg
1217dc9c6e
Making alias analysis use sets
2010-02-28 22:42:10 -05:00
Daniel Ehrenberg
434605c0b5
Changing some uses of prune to use members
2010-02-27 13:14:03 -05:00
Daniel Ehrenberg
7cd3360cdd
Fixing ambiguity between sets and namespaces in many unit tests and furnace.auth
2010-02-26 17:17:40 -05:00
Daniel Ehrenberg
6298203b4c
Making all of basis and extra unambiguous for sets/namespaces
2010-02-26 16:28:38 -05:00
Daniel Ehrenberg
7074979745
Moving new-sets to sets
2010-02-26 16:01:01 -05:00
Daniel Ehrenberg
a72e2cc96c
Finishing converting compiler.cfg.ssa.construction.tdmsc to new-sets
2010-02-26 13:53:20 -05:00
Daniel Ehrenberg
73a990a4b8
Making it fast to create a new hashset
2010-02-26 13:24:26 -05:00
Daniel Ehrenberg
b76c82048d
Making propagation and tuple.parser refer to new-sets; adding some missing features from sets into new-sets
2010-02-26 12:07:37 -05:00
Daniel Ehrenberg
a3c168cb5e
Merge branch 'master' of git://factorcode.org/git/factor into bags
2010-02-26 10:00:57 -05:00
Daniel Ehrenberg
aa438efc35
Merge branch 'master' of git://factorcode.org/git/factor into s3
2010-02-24 21:38:24 -06:00
Daniel Ehrenberg
2034e1ef05
Fewer unnecessary dependence edges between stack operations, implemented by reviving stack height normalization. Now, 40% of spills and reloads are eliminated in total
2010-02-24 14:20:43 -06:00
Joe Groff
4cfa1a6c77
rename current string-mangling "char*" to "c-string". char* is now just a boring old pointer to char
2010-02-23 11:42:02 -08:00
Slava Pestov
ae25cfe712
Get foldable and flushable declarations working on typed words
2010-02-24 00:16:55 +13:00
Slava Pestov
eb3f8632dd
stack-checker.alien: now that C types are words, the compiler can add dependencies on them when compiling alien words. This triggers the necessary recompilation when C types are redefined
2010-02-22 21:32:41 +13:00
Slava Pestov
6501480a0e
Fix two problems with recompilation: predicate constant folding was recording unsatisfied dependencies in some cases, and literal tuple instances of forgotten classes would cause problems for method inlining
2010-02-20 12:01:47 +13:00
Daniel Ehrenberg
04878057af
Compiler.cfg.{dce,linearization} use new-sets
2010-02-16 15:48:07 -06:00
Daniel Ehrenberg
30cc248bb3
Bit sets use new new set protocol, and compiler.cfg.ssa.construction.tdmsc is updated for it
2010-02-16 15:14:32 -06:00
Slava Pestov
b963d56aac
compiler.tree.escape-analysis: fix bug that comes up when inheritance is used
2010-02-16 14:44:13 +13:00
Slava Pestov
64a37d2db6
compiler.tree.propagation.transforms: tweak 2^ transform to fix performance regression in benchmark.beust2; introduced by 47d6507548
2010-02-16 01:03:09 +13:00
Daniel Ehrenberg
6d36bfd104
Modifying dependence graph construction for faster compile time
2010-02-13 21:35:40 -06:00
Daniel Ehrenberg
7565588f4f
Merge branch 'master' of git://factorcode.org/git/factor into s3
2010-02-13 20:26:14 -06:00