Commit Graph

352 Commits (ae25cfe7127ae4fdecebcc6d2fe24c6e8469bb4f)

Author SHA1 Message Date
Slava Pestov 145b635eb6 More optimization intended to reduce compile time. Another 10% speedup on compiling empty PEG parser
- new map-flat combinator replaces usages of 'map flatten' in compiler
- compiler.tree.def-use.simplified uses an explicit accumulator instead of flatten
- compiler.tree.tuple-unboxing uses an explicit accumulator instead of flatten
- fix inlining regression from last time: custom inlining results would sometimes be discarded
- compiler.tree's 3each and 3map combinators rewritten to not use flip
- rewrite math.partial-dispatch without locals (purely stylistic, no performance increase)
- hand-optimize flip for common arrays-of-arrays case
- don't run escape analysis and tuple unboxing if there are no allocations in the IR
2008-12-06 11:17:19 -06:00
Slava Pestov a56d480aa6 Various optimizations leading to a 10% speedup on compiling empty EBNF parser:
- open-code getenv primitive
- inline tuple predicates in finalization
- faster partial dispatch
- faster built-in type predicates
- faster tuple predicates
- faster lo-tag dispatch
- compile V{ } clone and H{ } clone more efficiently
- add fixnum fast-path to =; avoid indirect branch if two fixnums not eq
- faster >alist on hashtables
2008-12-06 09:16:29 -06:00
Slava Pestov 044e2867d5 Teach compiler about string-nth range 2008-12-05 23:51:58 -06:00
Slava Pestov aa838dbc2d Fix compile errors 2008-12-05 09:04:16 -06:00
Slava Pestov 6c7005d588 Tweak inlining heuristic 2008-12-05 01:50:14 -06:00
Slava Pestov fa6a2047f0 New inlining heuristic: number of usages within this word. Speeds up bootstrap by 10% 2008-12-04 07:05:59 -06:00
Slava Pestov e304d3c9f8 Local DCE 2008-12-04 06:02:49 -06:00
Slava Pestov e6cb449b19 optimized. now accepts method-specs 2008-12-03 10:44:21 -06:00
Slava Pestov e5ed7447ed Removing more >r/r> usages 2008-12-03 08:46:16 -06:00
Slava Pestov d60c79c9bf Expand instance? with literal class 2008-12-03 08:11:51 -06:00
Slava Pestov 402da00390 Fixing bootstrap with specialized arrays 2008-12-02 02:44:19 -06:00
Slava Pestov e8a69a3aea Fix conflict 2008-11-29 05:14:49 -06:00
Slava Pestov 86d45262dc Add toutput ype propagation for #alien-invoke and #alien-indirect nodes 2008-11-29 03:47:38 -06:00
Slava Pestov 265e57e21a Fix optimized. to literalize words when printing #push nodes 2008-11-29 00:37:26 -06:00
Slava Pestov 1fa819191d Change inlining heuristic so that it behaves the same with dip and >r/r> 2008-11-24 05:46:26 -06:00
Slava Pestov c678e6e362 Don't use combinators.short-circuit in compiler 2008-11-21 04:00:37 -06:00
Slava Pestov 79bffecc2e Add type function for /mod 2008-11-21 01:54:56 -06:00
Slava Pestov 281657dd82 Fix conflict 2008-11-18 22:18:14 -06:00
Slava Pestov 9e82f1f8dd Better inference error messages 2008-11-16 19:42:53 -06:00
Slava Pestov 7fc13ef03c dlists no longer have a length slot; tweak dlist code so that types infer better 2008-11-16 05:53:25 -06:00
Slava Pestov 2fe364a7bb Specialized arrays work in progress 2008-11-14 20:18:16 -06:00
Slava Pestov 5bae69426d Stack checker cleanup and optimization
- stack-checker.state vocabulary split up into stack-checker.{state,values,recursive-state}
- code that modifies and searches recursive state factored out into stack-checker.recursive-state
- recursive state is now a set of three binary hash trees instead of an alist, and no longer contains unnecessary data
- binary hash trees are in stack-checker.recursive-state.tree: unbalanced, persistent
- ~8 second speedup on bootstrap, ~20 second speedup in "peg.javascript" require
2008-11-13 00:07:45 -06:00
Slava Pestov 4a1bcacfd4 Refactoring recursive-state alist; now its a mapping from words to local state triples, reduces searching by a bit 2008-11-12 19:08:40 -06:00
Slava Pestov d970a632bb Fix nodes>quot 2008-11-11 19:51:12 -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
Slava Pestov a32acdcff0 Tweak grouping code for better method inlining 2008-11-11 12:11:13 -06:00
Slava Pestov f04b32ea02 Remove duplicated logic 2008-11-11 09:10:33 -06:00
Slava Pestov 792df37431 Update unit test 2008-11-11 08:50:30 -06:00
Slava Pestov 5f4b247072 Propagation pass now uses a stack of hashtables for predicated constraints instead of cloning a hashtable. New strategy for recursive propagation; now converges with fewer iterations. ~15 sec bootstrap time improvement 2008-11-11 08:49:00 -06:00
Slava Pestov 7f9fbdaa4e cleanup pass didn't properly handle conditionals where both branches were dead 2008-11-11 08:38:03 -06:00
Slava Pestov 43335d9c36 Intervals now use a special singleton for the full interval to eliminate FP math in the common case; fix a bug in value-info<= 2008-11-11 08:30:14 -06:00
Slava Pestov bfd119e3b5 I/O ricing: various hints added so that UTF8 and ASCII fastpaths compile with less dispatch. 25% improvement on reverse-complement 2008-11-06 00:02:44 -06:00
Slava Pestov cc879fa9b7 Tuple layouts are now arrays, instead of built-in types. The superclass
array is now part of the tuple layout object itself, and class hashcodes
are stored alongside class words there. This removes 2 indirections when
reading a superclass, and 3 when reading a superclass hashcode.
2008-11-05 22:20:29 -06:00
Slava Pestov 06b99c31ee Fix regression. If a parsing word called the compiler, it might compile a caller of a generic before the generic gets built, which would throw an error since the inferred effect of the generic might have less inputs than the combination's dispatch# 2008-11-03 20:59:48 -06:00
Slava Pestov 1aefde994f Cleanup 2008-11-03 00:03:22 -06:00
Slava Pestov 0d83873174 Fix regression 2008-11-03 00:03:15 -06:00
Slava Pestov 1912c57bb5 Fix comment 2008-10-23 05:55:50 -05:00
Slava Pestov 0cc0a41e57 Update for compiler.intrinsics removal 2008-10-20 20:40:36 -05:00
Slava Pestov e92f795a76 More work on intrinsics; memory allocation and slot access now expands correctly 2008-10-20 20:40:15 -05:00
Slava Pestov f092622fac CFG IR is now pure SSA 2008-10-20 01:56:28 -05:00
Slava Pestov d8d3645d72 Fixing more codegen bugs 2008-10-13 12:49:20 -05:00
Slava Pestov f979ae5b82 Expand slot accessors further to avoid having to use complex template decision 2008-10-11 14:05:15 -05:00
Slava Pestov 0e4e05d5cd Debugging new codegen 2008-10-08 03:51:44 -05:00
Slava Pestov c19f2257f4 Fix permission bits 2008-10-02 08:34:49 -05:00
Slava Pestov f539406ee1 Fold class predicates applied to literals 2008-10-02 05:12:38 -05:00
Slava Pestov d4134a2ca1 Fix loop detection bug 2008-10-02 01:17:45 -05:00
Slava Pestov 1a865f89ac Some optimizer change sfores for new codegen 2008-09-17 22:18:08 -05:00
Slava Pestov a211e44bb9 Found a place to use the locals in literals feature 2008-09-13 04:43:29 -05:00
Slava Pestov 01129fb9bd Add unit test for locals performance regresion 2008-09-13 03:09:16 -05:00
Slava Pestov 10c68ebb21 New modular arithmetic optimization pass 2008-09-12 18:08:38 -05:00
Slava Pestov 8d7ebc5106 Change stack effect of nths to match nth, rice bounds-check? 2008-09-12 18:08:19 -05:00
Slava Pestov 54232f80ca Adding identity optimization pass, tweak inlining heuristic 2008-09-12 08:18:44 -05:00
Slava Pestov 2bf532263d Oops 2008-09-12 05:36:06 -05:00
Slava Pestov 40da49bef5 Perform loop detection before normalization, clean up normalization pass, more aggressive recursive return value propagation. Fixes regression on nsieve benchmark 2008-09-12 05:17:27 -05:00
Slava Pestov f2721e0608 Help lint fixes 2008-09-11 05:04:49 -05:00
Slava Pestov cf80dd122a Updating code for make and fry changes 2008-09-10 22:11:40 -05:00
Slava Pestov 44f53de164 Move make to its own vocabulary, remove fry _ feature 2008-09-10 20:07:00 -05:00
Slava Pestov e6637a1118 Cleanup 2008-09-08 19:02:24 -05:00
Doug Coleman 8a921c791c if-empty changes 2008-09-06 19:13:59 -05:00
Doug Coleman 9af12d96cf left-trim -> trim-left 2008-09-05 18:56:35 -05:00
Slava Pestov 6b07c85fec Minor fixes here and there for delegation slot removal 2008-09-03 06:05:50 -05:00
Slava Pestov e1716d92b3 Remove delegation slot 2008-09-03 03:46:56 -05:00
Slava Pestov a4a00f6e40 Adding missing optimizations to finalization pass 2008-09-02 22:59:49 -05:00
Slava Pestov 110a5e5162 Change equality semantics 2008-09-02 02:02:05 -05:00
Slava Pestov 669e0f8f0a Propagate slot types of literals 2008-09-01 18:25:21 -05:00
U-SLAVA-DFB8FF805\Slava 8fed0d29eb Fix dead code elimination with alien nodes 2008-09-01 02:04:42 -05:00
Slava Pestov 29e5ed2adb Fixing deploy tool 2008-08-31 19:17:04 -05:00
Slava Pestov 6717d3743e Fix escape analysis bug; speedup on fib4 benchmark 2008-08-31 09:03:03 -05:00
Slava Pestov dd45c26234 Oops, we weren't doing TCO in some cases 2008-08-31 05:40:29 -05:00
Slava Pestov f5fbd94a4c New compiled crossref implementation 2008-08-31 01:34:00 -05:00
Slava Pestov 3cef7c9992 Smarter usage tracking system 2008-08-30 02:31:27 -05:00
Slava Pestov 85cdb1b767 Working on new compiled usage strategy; old one was wrong 2008-08-30 00:05:27 -05:00
Slava Pestov c674dd9101 Regression: insufficient compiled usage recorded 2008-08-29 17:52:43 -05:00
Slava Pestov 783d0fcabf Fix cleanup of conditionals with no live branches 2008-08-29 04:40:53 -05:00
Slava Pestov 6ead724b25 Fixing bugs 2008-08-29 04:23:39 -05:00
Slava Pestov 1fcbdf9d52 Fix more compiler bugs 2008-08-29 00:26:47 -05:00
Slava Pestov 74dccc7fbf Debugging compiler 2008-08-28 22:28:34 -05:00
Slava Pestov ea2d02f248 Add some failing tests 2008-08-27 16:25:37 -05:00
Slava Pestov f471659810 Fix load error 2008-08-27 05:54:01 -05:00
Slava Pestov 799cefc39a Fix conflict 2008-08-27 05:52:38 -05:00
Slava Pestov 8c46a3d56f Only annotate certain nodes ith value info 2008-08-24 14:02:33 -05:00
Slava Pestov 7359873b60 Minor compiler tweaks 2008-08-24 01:21:23 -05:00
Slava Pestov 8b855b2445 Help lint fixes 2008-08-22 23:00:35 -05:00
Slava Pestov 40e926609a Fixing unit tests 2008-08-22 22:07:59 -05:00
Slava Pestov fd8136786b Cleaning up DCE 2008-08-22 18:09:48 -05:00
Slava Pestov 2440fc1ceb Fixing remaining issues 2008-08-22 17:38:23 -05:00
Slava Pestov 9aa6d8ae04 Compiler fixes 2008-08-22 15:30:57 -05:00
Slava Pestov 86f11713e3 Fixing some more bugs 2008-08-22 03:12:15 -05:00
Slava Pestov c773d8256b Fix another bug; cleanup phase too eager to remove #phi nodes 2008-08-19 21:48:08 -05:00
Slava Pestov 17758f3749 Stack flow checker; various fixes 2008-08-19 17:11:33 -05:00
Slava Pestov 0efec0eff1 DCE fixes 2008-08-18 21:30:10 -05:00
Slava Pestov aa9341e579 Enforce that usages of >r/r> must be balanced within a quotation 2008-08-18 20:49:03 -05:00
Slava Pestov 9b6fb70eba Debugging optimizer 2008-08-18 15:47:49 -05:00
Slava Pestov 2fa08c75b9 Fix bug, better tests 2008-08-15 21:45:05 -05:00
Slava Pestov 32b762f5ec Fixing soundness issues with recursive combinators 2008-08-15 04:09:23 -05:00
Slava Pestov 10b75276ff Fix optimization of clone, (clone) 2008-08-15 02:49:52 -05:00
Slava Pestov e1987d4af9 Debugging new optimizer 2008-08-14 23:35:19 -05:00
Slava Pestov a61e13f7be More aggressive DCE 2008-08-13 23:52:49 -05:00
Slava Pestov a982e564bf More DCE work 2008-08-13 18:56:50 -05:00
Slava Pestov 4f82ebdc23 DCE work in progress 2008-08-13 14:17:04 -05:00
Slava Pestov 56d272df9e Merge branch 'master' into new_optimizer 2008-08-12 03:36:44 -05:00
Slava Pestov f2a5a30c6f New front-end and high-level optimizer lands 2008-08-12 03:22:45 -05:00