Commit Graph

805 Commits (8c5a22e2ca796252cc56f5b25106cac1f6b819de)

Author SHA1 Message Date
Slava Pestov d8fc595383 compiler.cfg: clean up ##phi literals in tests 2010-05-03 17:34:24 -04:00
Slava Pestov 460f163014 compiler.cfg.linear-scan: clean up spill slot assignment 2010-05-03 17:34:24 -04:00
Slava Pestov ad55659485 compiler.cfg.ssa.detruction: coalesce different representations in more cases 2010-05-03 17:34:22 -04:00
Slava Pestov c35eba5e34 compiler.cfg.alias-analysis: write unit tests and fix redundant store elimination 2010-05-03 17:34:22 -04:00
Slava Pestov ee890ed1cc compiler.cfg.debugger: clean up and make it more flexible 2010-05-03 17:34:22 -04:00
Slava Pestov 8849e370ca Register allocation now uses SSA properties to coalesce values with different representations 2010-05-03 17:34:20 -04:00
Slava Pestov 16566506f1 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 d38dbdabce compiler.cfg.linear-scan: cleanups 2010-05-03 17:34:18 -04:00
Slava Pestov 03bd160f08 Code cleanups 2010-05-03 17:34:17 -04:00
Slava Pestov 813eabadc6 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 fc7a1ad8b3 New GC checks work in progress 2010-05-03 17:34:16 -04:00
Slava Pestov e4ce0d92f2 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 6b3aeeb414 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 fd84bb98bc strings: move string-nth primitive out of the VM and into the library 2010-05-03 17:34:12 -04:00
Slava Pestov 73c34341d7 compiler.cfg.representations: simplify a little 2010-05-03 17:34:11 -04:00
Slava Pestov 808be63c07 compiler.cfg.representations: add peephole optimizations for integer comparisons 2010-05-03 17:34:11 -04:00
Slava Pestov 8af111577c compiler.cfg.representations: fix various bugs 2010-05-03 17:34:11 -04:00
Slava Pestov 9b130730b6 compiler.cfg.representations: add more peephole optimizations to reduce fixnum tagging and untagging overhead 2010-05-03 17:34:11 -04:00
Slava Pestov 31cd3ff574 compiler.cfg.value-numbering: more cleanups 2010-05-03 17:34:10 -04:00
Slava Pestov 7982a3f92e 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 a4c5525a56 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 2764cc81e2 compiler.cfg.value-numbering: remove constant -vs- literal distinction 2010-05-03 17:34:09 -04:00
Slava Pestov c400c7e78a compiler.cfg.ssa.liveness: remove unused pass 2010-05-03 17:34:08 -04:00
Slava Pestov b9e27d1c82 compiler.cfg.builder: fix unit tests 2010-05-03 17:34:08 -04:00
Slava Pestov 2b50b9b315 compiler.cfg.value-numbering: merge 'simplify' pass into 'rewrite' 2010-05-03 17:34:08 -04:00
Slava Pestov 80c8a7154d 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 505b34a611 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 59fe281799 compiler.cfg: more flexible addressing for ##slot and ##set-slot 2010-05-03 17:34:06 -04:00
Slava Pestov becd957d29 compiler.cfg: merge all alien accessors into ##load-memory-imm and ##store-memory-imm 2010-05-03 17:34:06 -04:00
Slava Pestov 3c965afd10 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 12907654d5 compiler.cfg.value-numbering: fix compile error 2010-05-03 17:34:04 -04:00
Slava Pestov c94666073b 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 6403572286 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 f000bb4bd5 compiler.cfg.instructions: more typos 2010-05-03 17:34:02 -04:00
Slava Pestov 80558a93fa Debugging untagged fixnums 2010-05-03 17:34:02 -04:00
Slava Pestov 6fdcd9fb02 Untagged fixnums work in progress 2010-05-03 17:34:02 -04:00
Slava Pestov 19412e4ad1 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
Slava Pestov 1d7089dc04 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 dbd7489894 compiler.cfg: fix some bugs introduced by the ##compare-imm fusion patch 2010-04-18 21:42:45 -05:00
Slava Pestov c4cf2a4085 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 904c9f3b26 Improving dependence graph correctness 2010-04-18 19:59:52 -05:00
Daniel Ehrenberg d3a50883ab Making some scheduling assertions only run in unit tests 2010-04-15 17:36:43 -05:00
Daniel Ehrenberg 1e1614eda9 Merge branch 'master' of git://factorcode.org/git/factor into s3 2010-04-15 17:28:53 -05:00
Joe Groff 3b4f8758b5 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 19b7215897 Fixing USING: line of scheduling to remove unnecessary vocabs 2010-04-05 15:45:06 -05:00
Daniel Ehrenberg ba837da095 Scheduling has to come before representation selection, since the latter inserts memory operations 2010-04-05 00:24:12 -05:00
Daniel Ehrenberg 4cc50281c1 Merge branch 'master' of git://factorcode.org/git/factor into s3 2010-04-04 19:43:15 -05:00
Slava Pestov 4f585f991d compiler: new set-special-object intrinsic; more efficient special-object intrinsic 2010-04-01 20:09:14 -04:00
Joe Groff d951be1832 "cdecl" -> cdecl 2010-03-31 19:20:35 -07:00
Slava Pestov b84b1423d9 compiler: add intrinsic for context-object primitive 2010-03-27 02:56:11 -04:00
Daniel Ehrenberg 802ce4580b Scheduling uses sets where appropriate 2010-03-24 10:38:52 -04:00
Daniel Ehrenberg 6f9d3389e2 Merge branch 's3' of git://github.com/littledan/Factor into s3 2010-03-23 16:46:28 -04:00
Joe Groff ce605b2739 factor code duplication in compiler.cfg.intrinsics.simd.backend 2010-03-20 10:57:04 -07:00
Joe Groff 6e1a424614 compiler.cfg.intrinsics.simd.backend: eliminate duplicated work done on successful insn sequence 2010-03-20 02:51:49 -07:00
Joe Groff 15a7e9ef54 compiler.cfg.intrinsics.simd.backend: use less grotesque metaprogramming to determine simd instruction sequences 2010-03-20 02:16:50 -07:00
Daniel Ehrenberg 8530ba467e Cleaning up compiler.cfg.ssa.construction 2010-03-17 20:12:10 -04:00
Daniel Ehrenberg 1b61e2e5cf 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 d4a0a69eb1 generalize stack effects so we can bootstrap with the stricter stack effect checking 2010-03-08 23:38:10 -08:00
Joe Groff 8d274e851a fix ... in compiler.cfg.linearization 2010-03-05 14:27:58 -08:00
Daniel Ehrenberg 70c90c04fe compiler.cfg.def-use uses sets 2010-03-02 19:23:34 -05:00
Daniel Ehrenberg 84d6cf5d7b Maing vocabs.hierarchy use sets; modifying alias analysis's use of sets 2010-02-28 22:55:22 -05:00
Daniel Ehrenberg d797e8d29e Making alias analysis use sets 2010-02-28 22:42:10 -05:00
Daniel Ehrenberg 2b5af07494 Fixing ambiguity between sets and namespaces in many unit tests and furnace.auth 2010-02-26 17:17:40 -05:00
Daniel Ehrenberg 142f530f1b Making all of basis and extra unambiguous for sets/namespaces 2010-02-26 16:28:38 -05:00
Daniel Ehrenberg 0f0571e48a Moving new-sets to sets 2010-02-26 16:01:01 -05:00
Daniel Ehrenberg ab81eb7054 Finishing converting compiler.cfg.ssa.construction.tdmsc to new-sets 2010-02-26 13:53:20 -05:00
Daniel Ehrenberg 02d2d8eba5 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
Daniel Ehrenberg fd7bcd35ea Compiler.cfg.{dce,linearization} use new-sets 2010-02-16 15:48:07 -06:00
Daniel Ehrenberg ef281f1921 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
Daniel Ehrenberg 84e386c3fc Modifying dependence graph construction for faster compile time 2010-02-13 21:35:40 -06:00
Daniel Ehrenberg 5e6ae48adf Using original instruction order as a tiebreaker in scheduling 2010-02-11 23:12:17 -06:00
Daniel Ehrenberg b4a668d41f Scheduling doesn't have such redundant data structures anymore 2010-02-11 21:21:22 -06:00
Daniel Ehrenberg 95f860774f Scheduling schedules more BBs--it was leaving out some ones that shouldn't've been. Now it's almost 30% of spills and reloads that are eliminated 2010-02-11 21:02:02 -06:00
Daniel Ehrenberg 731cdd6747 Making the fan-in tree generation work. Finally: a 20% reduction in spills and reloads on x86! 2010-02-11 00:19:53 -06:00
Daniel Ehrenberg 29d44075e4 Working on fixing scheduling 2010-02-10 22:36:26 -06:00
Daniel Ehrenberg d350b54325 A first attempt at implementing Vivek Sarkar's algorithm for scheduling for register pressure 2010-02-10 21:43:30 -06:00
Slava Pestov 8a8c47ab1d compiler.cfg.intrinsics.simd: ignore dummy assert-positive word 2010-01-31 18:19:14 +13:00
Doug Coleman 7322c0a400 remove a stray character 2010-01-22 15:07:01 -06:00
Doug Coleman 8ae200d419 Rename accumulator to collector, pusher to selector 2010-01-22 15:00:53 -06:00
Slava Pestov ce05955693 stack-checker: add inputs and outputs words, since 'infer (in>>|out>>) length' was coming up a lot 2010-01-15 08:04:14 +13:00
Slava Pestov 880fb747fc Removing integers-as-sequences 2010-01-15 07:15:33 +13:00
Slava Pestov 790674cf89 Rename kernel.private:getenv/setenv to special-object/set-special-object to mirror recent renaming on the VM side 2010-01-13 18:08:18 +13:00
Slava Pestov 1e2c0327ee Add alien-assembly form for inline assembler, works like alien-invoke except calls a user-supplied quotation instead of generating a subroutine call. Replaces FPU status control, SSE detection and read timestamp routines in vm/cpu-x86.*S 2010-01-07 17:39:22 +13:00
Slava Pestov 9399a68786 Change how non-volatile register preservation is done in alien callbacks, with the aim of fixing callbacks on PowerPC, and to eventually eliminate assembly code from VM
- Simplify calculation of offset in relocation table
- Open-code %alien-callback
- Remove magic_frame hack from context objects
- Move magical return instruction from optimizing compiler backend into callback entry stub
2010-01-03 01:11:51 +13:00
Slava Pestov 8f449f1a82 Get optimizing compiler working without global register variables in VM 2009-12-22 15:42:49 +13:00
Slava Pestov 31a260b74c vm: big overhaul of non-optimizing compiler
- change some primitives into sub-primitives: fixnum+ fixnum- fixnum* inline-cache-miss inline-cache-miss-tail
- rename some relocation types for clarity
- some other minor re-organizations and cleanups
2009-12-15 07:20:09 -05:00
Joe Groff 1ad9dc14b4 fix simd tests 2009-12-05 17:17:16 -08:00
Joe Groff d674ff8191 simd intrinsic implementation for v*high, v*hs+, vavg, and vsad 2009-12-05 14:52:18 -08:00
Joe Groff 778c21e94c change compiler.cfg.intrinsics.simd tests to not use types and operations that depend on host cell size 2009-12-04 13:23:31 -08:00
Joe Groff 4116e2aa4e don't use intrinsics for simd vector element operations when the component size doesn't fit in a fixnum 2009-12-03 12:46:56 -08:00
Joe Groff ebcaaa0d64 Merge branch 'master' into simd-cleanup 2009-11-26 16:14:46 -08:00
Joe Groff ea7c5b6d86 fix buggy simd intrinsics 2009-11-26 13:28:40 -08:00
Joe Groff dcc9e6cbf3 don't try to rewrite redundant test-vector-exprs 2009-11-25 20:06:11 -08:00
Joe Groff 8095704010 change name of 'unsign-rep' to more sensible 'signed-rep' 2009-11-24 22:44:12 -08:00
Joe Groff 90cd1b47f7 make math.vectors.simd tests pass again 2009-11-24 18:30:12 -08:00
Joe Groff 5aebf7ffba update compiler.cfg.intrinsics.simd tests 2009-11-24 12:50:27 -08:00
Joe Groff 804c8c3bcc fix simd intrinsic compilation 2009-11-24 11:37:28 -08:00
Joe Groff 3b17573c7c break simd intrinsics into a separate vocab so they can be intrinsified before the simd methods compile 2009-11-19 11:53:46 -08:00
Joe Groff 4700890b70 fix primitive emit fallback for simd intrinsics 2009-11-18 21:29:51 -08:00
Joe Groff b54a925d1e enable simd intrinsics and fix first-pass compiler errors 2009-11-18 20:32:05 -08:00
Joe Groff e6295d5640 tests for all simd intrinsics 2009-11-18 18:20:58 -08:00
Slava Pestov 08b6ebc7fa Factor source files should not be executable 2009-11-21 17:50:43 -06:00
Joe Groff 3698595d39 properly handle -vector-op and case words in simd.backend 2009-11-18 12:36:41 -08:00
Joe Groff 132ce61bb5 start on tests for simd intrinsics 2009-11-17 11:13:16 -08:00
Slava Pestov 43c1ae0a44 compiler.cfg: 'basic-block new hashcode' should not throw an exception; fixes tools.deploy.test.11 2009-11-16 02:01:36 -06:00
Joe Groff 00b9506439 compilation fixes 2009-11-14 23:43:22 -06:00
Joe Groff 993631e44c Merge branch 'master' of git://factorcode.org/git/factor into simd-cleanup
Conflicts:
	basis/math/vectors/simd/functor/functor.factor
2009-11-14 21:02:39 -06:00
Joe Groff 9efff4a322 backend fixups 2009-11-14 20:59:03 -06:00
Joe Groff db1ae26801 sever lingering dependencies on simd from compiler 2009-11-11 16:08:40 -06:00
Slava Pestov 3b75114015 Fixing test failures 2009-11-11 02:40:24 -06:00
Slava Pestov 68f3087c1c Faster identity-hashcode primitive; fast path now opencoded by the compiler 2009-11-11 02:27:19 -06:00
Joe Groff d52d56f335 backend for choosing available SIMD intrinsic implementations 2009-11-10 23:35:46 -06:00
Slava Pestov 4168ffbcee New identity-hashcode primitive 2009-11-10 21:18:54 -06:00
Slava Pestov b4d997d17a compiler.cfg.intrinsics.slots: new implementation of value-tag 2009-11-10 17:30:27 -06:00
Joe Groff a279b360eb Merge branch 'master' into simd-cleanup
Conflicts:
	basis/math/vectors/simd/functor/functor.factor
2009-11-05 11:27:08 -06:00
Joe Groff cf28782533 more intrinsic madness 2009-11-05 09:52:57 -06:00
Joe Groff 54e9baa7e4 change ##horizontal-add-vector insn to better match what the HADD SSE instructions do (add adjacent pairs, pack results) 2009-11-04 12:18:01 -06:00
Slava Pestov 4b31c10830 compiler.cfg.intrinsics.allot: fix inline byte array allocation on 32-bit platforms 2009-11-03 23:44:20 -06:00
Slava Pestov d0a784d61c compiler: update unit tests for 4-bit tag change 2009-11-03 21:40:29 -06:00
Joe Groff e12c708797 new intrinsic generators, pt1 2009-11-03 21:38:45 -06:00
Slava Pestov f102bd7ded cpu.x86: update %box-displaced-alien for introduction of address field 2009-11-03 03:17:43 -06:00
Slava Pestov bc45ceb05b Merge branch 'master' into new_gc 2009-11-02 20:34:13 -06:00
Slava Pestov 6b1f651208 compiler.cfg.intrinsics: uncomment line commented out by mistake 2009-11-02 20:33:14 -06:00
Slava Pestov f1479e800b Merge branch 'master' into new_gc 2009-11-02 20:11:43 -06:00
Slava Pestov bb202805d8 compiler.cfg: don't generate useless methods in instruction meta-programming. reduces bootstrap time 2009-11-02 20:11:29 -06:00
Slava Pestov 6299c42564 Minor bug fixes for 4-bit tags 2009-11-02 17:41:36 -06:00
Joe Groff 9ac1cec6c4 move all simd intrinsics to compiler.cfg.intrinsics.simd, and only load it when math.vectors.simd is loaded 2009-11-02 15:17:34 -06:00
Slava Pestov d65296b334 vm: 4 bit tags, new representation of alien objects makes unbox-any-c-ptr more efficient (work in progress) 2009-11-02 04:25:54 -06:00
Joe Groff 11dd8720f4 Merge branch 'master' of git://factorcode.org/git/factor 2009-10-30 00:42:37 -05:00
Joe Groff ca8d4c15f4 add ##shl-vector-imm and ##shr-vector-imm insn variants. use merge/shr instead of compare/merge to do signed unpacks 2009-10-30 00:41:19 -05:00
Doug Coleman 1ee8c8f5eb sigma -> map-sum 2009-10-29 14:34:04 -05:00
Joe Groff c6761710a6 Merge branch 'master' of http://factorcode.org/git/factor
Conflicts:
	basis/locals/locals.factor
	basis/peg/peg.factor
	extra/infix/infix.factor
2009-10-28 16:17:24 -05:00
Joe Groff 22a9be5ea5 update existing code to use :> ( ) when possible 2009-10-28 16:11:33 -05:00
Doug Coleman b5fd809209 memq? -> member-eq?, sorted-memq? -> sorted-member-eq? 2009-10-28 15:02:00 -05:00
Doug Coleman 82992f6dd4 reverse-here -> reverse! 2009-10-28 14:40:15 -05:00
Doug Coleman a57e990af7 parsed -> suffix!, add append! 2009-10-28 13:38:27 -05:00
Joe Groff 33f373162d fix load errors from bootstrapping 2009-10-28 12:51:03 -05:00
Slava Pestov ba37429563 filter-here -> filter! 2009-10-28 00:44:05 -05:00
Slava Pestov 03e70d1aa9 remq -> remove-eq, delq -> remove-eq! 2009-10-28 00:23:08 -05:00
Slava Pestov b8a51c7eb0 delete-nth -> remove-nth! 2009-10-27 23:41:57 -05:00
Slava Pestov 34d3d4962a change-each -> map!, deep-change-each -> deep-map! 2009-10-27 22:32:56 -05:00
Joe Groff 8b6665c57e update existing code for [let change 2009-10-27 22:05:37 -05:00
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
Joe Groff a2976083be generate unsigned vector comparison fallbacks using min/max or xor/signed compare 2009-10-20 22:30:57 -05:00
Joe Groff a0a816e88a generate better fallback code for vmin/vmax intrinsics 2009-10-20 19:22:38 -05:00
Joe Groff d570e58374 Merge branch 'master' of git://factorcode.org/git/factor 2009-10-20 17:42:29 -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 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