Björn Lindqvist
2077ae9180
compiler.cfg.linear-scan.assignment: refactoring vreg>reg and
...
assign-registers-in-block so locals aren't needed
2015-04-29 09:31:59 -07:00
Björn Lindqvist
135d7f5ff3
compiler.cfg.*: more unit tests
2015-04-29 09:31:59 -07:00
Björn Lindqvist
992314d2de
compiler.cfg.*: new word for consuming deques slurp/replenish-deque
...
most uses of slurp-deque processes one item and pushes a sequence of
items to continue working with. it can be formalized into a
slurp/replenish-deque combinator which also reduces the amount of
variables you need to use
2015-04-29 09:31:58 -07:00
Björn Lindqvist
c3ca8bd859
compiler.cfg.*: even more compiler docs
2015-04-29 09:31:58 -07:00
Björn Lindqvist
997f95196c
compiler.cfg.*: lots of new unit tests
2015-04-29 09:31:58 -07:00
Björn Lindqvist
167d1598b3
compiler.cfg.linear-scan.allocation.*: lots more docs and some word simplifications
2015-04-29 09:31:58 -07:00
Björn Lindqvist
63a1e90af8
compiler.cfg.ssa.cssa, compiler.cfg.ssa.destruction, compiler.utilities: docs & tests
2015-04-29 09:31:58 -07:00
Björn Lindqvist
16f6025979
compiler.cfg.linear-scan.allocation.spilling: docs and tests for this vocab
2015-04-29 09:31:58 -07:00
Björn Lindqvist
b827bc75cc
compiler.*: bunch of new docs for some compiler instructions
2015-04-29 09:31:58 -07:00
Björn Lindqvist
a17e943e88
compiler.cfg.liveness: refactoring so that words that doesn't modify
...
the live-set doesnt return it
e.g it's clearer when the effect is ( live-set insn -- ) than ( live-set insn -- live-set ) that the live-set is modified in place
2015-04-29 09:31:57 -07:00
Björn Lindqvist
c876d79b9d
compiler.cfg.liveness: lots of more tests and some docs
2015-04-29 09:31:57 -07:00
Björn Lindqvist
aa6fbf475e
compiler.cfg: the id slot of basic-block appears to not be needed
2015-04-29 09:31:57 -07:00
Björn Lindqvist
5cd44dc07c
compiler.cfg.linear-scan.allocation.state: set spill-area-size/align when the cfg tuple is created
2015-04-29 09:31:57 -07:00
Björn Lindqvist
d486de889d
compiler.cfg.*: smaller doc improvements
2015-04-29 09:31:57 -07:00
Björn Lindqvist
4cda101717
compiler.cfg.linear-scan.allocation.state: more docs and tests for vocab
2015-04-29 09:31:57 -07:00
Björn Lindqvist
043b6d5377
compiler.cfg.linear-scan.linear-scan: refactoring of word so that locals doesn't need to be used and more docs (by moving comments)
2015-04-29 09:31:56 -07:00
Björn Lindqvist
6c6f85428c
compiler.cfg.intrinsics.simd: refactoring to use assocs instead of case-s for lookups + tests
2015-04-29 09:31:56 -07:00
Björn Lindqvist
745d3f29b2
compiler.cfg.*: a bunch of new docstrings and other doc fixes
2015-04-29 09:31:56 -07:00
Björn Lindqvist
f9812d9874
compiler.cfg.stacks.*: possible fix for #1289
...
instead of delaying outputting ##replace instructions to when they are
needed, output them directly in the block so that "holes" in the
stacks are avoided.
2015-04-29 09:31:56 -07:00
Björn Lindqvist
177a356240
compiler.cfg.stacks.local: refactorings on the vocab to try and make it using less dynamic variables
2015-04-29 09:31:56 -07:00
Björn Lindqvist
91144c0712
compiler.cfg.stacks.*: simplify the code a little by making replace-sets, peek-sets and kill-sets contain hash-sets instead of hash-tables
2015-04-29 09:31:56 -07:00
Björn Lindqvist
0ff4c68e15
compiler.cfg.stacks.local: to simplify, end-local-analysis can take the block it operates on as argument
2015-04-29 09:31:56 -07:00
Björn Lindqvist
b983053130
compiler.cfg.*: putting test-init in compiler.cfg.stacks.tests didn't work, put new word cfg-unit-test in compiler.test
2015-04-29 09:31:55 -07:00
Björn Lindqvist
4390561a6e
compiler.cfg.*: new word reset-vreg-counter, useful for making test writing more convenient
2015-04-29 09:31:55 -07:00
Björn Lindqvist
2536943e82
compiler.cfg.*: new word connect-Nto1-bbs
...
using that word predecessors is already up-to-date so calling needs-predecessors isn't needed
2015-04-29 09:31:55 -07:00
Björn Lindqvist
8a7699e42c
compiler.cfg.*: refactoring to remove the initial-basic-block word
2015-04-29 09:31:55 -07:00
Björn Lindqvist
6559382028
compiler.cfg.*: ds-load removed
2015-04-29 09:31:55 -07:00
Björn Lindqvist
cc1903bec1
compiler.cfg.*: some refactoring in the stack tracking for #shuffle nodes
...
instead of having separate words for the stacks like inc-d/r and ds/rs-store use generic words that work on either stack
2015-04-29 09:31:55 -07:00
Björn Lindqvist
eda9535ce6
compiler.tree.propagation.call-effect: changing back call-effect-unsafe?, changing it made all images to large for some reason
2015-04-29 09:31:55 -07:00
Björn Lindqvist
837e098d41
compiler.cfg.*: a little more docs
2015-04-29 09:31:54 -07:00
Björn Lindqvist
ba4736ff75
compiler.cfg.stacks.local: change current-height to a two-tuple { { d emit-d } { r emit-r } } it makes the code a bit simpler
2015-04-29 09:31:54 -07:00
Björn Lindqvist
c360f0123b
compiler.cfg.stacks: a few unused words removed
2015-04-29 09:31:54 -07:00
Björn Lindqvist
09238cee4b
compiler.tree.propagation.call-effect: docs for this vocab
2015-04-29 09:31:54 -07:00
Björn Lindqvist
acc1bd3221
compiler.*: removing the check-d and check-r slots from gc-map and adjusting code that depended on those
2015-04-29 09:31:53 -07:00
Björn Lindqvist
2cd2aa498a
VM: the compiler doesn't emit any live overinitialized locations anymore
...
Any overinitialized location immediately becomes garbage and is not
reused again. This is very nice because then the gc maps can be
simpler again.
2015-04-29 09:31:53 -07:00
Björn Lindqvist
ded3760d46
compiler.*: merge of ##inc-r and ##inc-d into one instruction ##inc with a loc slot
...
this is nice because it leads to simpler code and matches how ##peek and ##replace instructions work
2015-04-29 09:31:53 -07:00
Björn Lindqvist
c7d9cb4c3d
compiler.cfg.*: new and improved docs
2015-04-29 09:31:53 -07:00
Björn Lindqvist
74ea76a3c9
compiler.cfg: unlikely? slot unused, lets get rid of it
2015-04-29 09:31:53 -07:00
Björn Lindqvist
bb504b7c3d
compiler.cfg.dependence: this vocab was only used by scheduling so it isn't needed anymore
2015-04-29 09:31:53 -07:00
Björn Lindqvist
b3ebb04d6d
compiler.cfg.*: since the height and scheduling compiler passes aren't used anymore lets remove them
2015-04-29 09:31:53 -07:00
Björn Lindqvist
e7fc6a789e
compiler.tree.*: more compiler tree docs
2015-02-05 11:01:05 +00:00
Doug Coleman
edf1bddd67
compiler.tests.optimizer: Re-enable the minor-gc test case that was
...
failing until bjourne's latest commits.
2015-01-22 13:03:28 -08:00
Doug Coleman
e4e6c0031a
compiler.cfg.stacks.clearing: Fix help-lint-all.
2015-01-22 12:30:49 -08:00
Björn Lindqvist
d2c0ae9fd9
compiler.cfg.stacks.*: more docs
2015-01-22 12:17:21 -08:00
Björn Lindqvist
71b054cf39
compiler.cfg.stacks.*: updated tests to match
2015-01-22 12:17:21 -08:00
Björn Lindqvist
3c1f223d90
compiler.cfg.stacks.*: use insn# as the key in the stack-record instead of the insn tuple itself
2015-01-22 12:17:21 -08:00
Björn Lindqvist
d19869f906
compiler.cfg.stacks.*: many new and fixed tests
2015-01-22 12:17:21 -08:00
Björn Lindqvist
d4493858da
compiler.cfg.stacks.*: vacant-peek checking readded
2015-01-22 12:17:20 -08:00
Björn Lindqvist
640759ffed
compiler.cfg.*: new step in finalization: clear-uninitialized
...
this step is supposed to analyze the cfg, find where there are peeks
that can cause stack underflow, and insert replace-imm instructions so
that there are no uninitialized stack locations if they do. could fix #1187
2015-01-22 12:17:20 -08:00
Björn Lindqvist
fd06e22e9a
compiler.cfg.stacks.map: new vocab for creating an assoc that contains the stack state for each instruction in a cfg
2015-01-22 12:17:20 -08:00
Björn Lindqvist
163fef12f9
compiler.cfg.*: detached the normalize-height and schedule-instructions passes
...
those stages cause uninitialized "holes" in the stacks which in turn
causes gc errors if stack underflows occur
2015-01-22 12:17:20 -08:00
Doug Coleman
ceebc1d6c1
compiler: Fix help-lint for @bjourne's recent awesome docs.
2015-01-17 14:02:59 -08:00
Doug Coleman
b4e9334d04
compiler.tests.stack-trace: Fix unit test.
2015-01-17 13:57:56 -08:00
Doug Coleman
c4fbeccfa8
compiler.tests.optimizer: Disable minor-gc test case for now. #1187 .
2015-01-17 11:02:05 -08:00
Björn Lindqvist
b6d25ba090
compiler.tests.stack-trace: unit tests against the #1265 bugs
2015-01-15 09:29:14 +00:00
Björn Lindqvist
d0dde922bd
compiler.cfg.*: new unit test vocabs
2014-12-31 03:37:17 +01:00
Björn Lindqvist
5782855343
compiler.cfg.*: more docs
2014-12-31 03:37:16 +01:00
Björn Lindqvist
0432b17409
compiler.cfg.*: refactoring away the compute-global-sets word
2014-12-31 03:37:16 +01:00
Björn Lindqvist
79d294e4bf
compiler.cfg.*: docs and more tests
2014-12-31 03:37:16 +01:00
Björn Lindqvist
1bd4525ac6
compiler.cfg.stacks.local: refactoring making stack-changes and height-changes take and return stuff instead of using variables and the make building
2014-12-31 03:37:16 +01:00
Björn Lindqvist
e87be7b5c8
compiler.cfg.parallel-copy: docs
2014-12-31 03:37:16 +01:00
Björn Lindqvist
24c9dbe160
compiler.cfg.stacks.height: these words are unused
2014-12-31 03:37:16 +01:00
Björn Lindqvist
2ccbcd6af6
compiler.cfg.*: more compiler docs
2014-12-31 03:37:16 +01:00
Björn Lindqvist
e968c16139
compiler.cfg.stacks.finalize: initial docs
2014-12-31 03:37:16 +01:00
John Benediktsson
c2c722891e
compiler.cfg.save-contexts: fix help-lint.
2014-12-15 15:11:06 -08:00
John Benediktsson
2a893a110a
compiler.cfg.linear-scan.allocation.state: don't use slot.syntax.
2014-12-15 13:10:59 -08:00
Björn Lindqvist
aee55f1b83
compiler.cfg.linear-scan.assignment: forgot that i removed live-intervals>min-heap
2014-12-15 21:04:53 +01:00
Björn Lindqvist
d6c1c075ff
compiler.cfg.linear-scan.allocation: using slurp-heap
2014-12-15 20:48:34 +01:00
Björn Lindqvist
84f8f26ce8
compiler.cfg.linear-scan.allocation.state: doc fixing
2014-12-15 20:44:53 +01:00
Björn Lindqvist
35d00da765
compiler.cfg.linear-scan.allocation.*: maybe a fix for #1227
...
The register allocator pops from the unhandled-intervals and
unhandled-sync-points heaps. If two live intervals share the same
start slot, then they can be popped in either order leading to
differently generated code. So instead use one
heap (unhandled-min-heap) and both the start and end slot as the heap
key to resolve tie-breakers
2014-12-15 20:44:53 +01:00
Björn Lindqvist
173f7c0869
compiler.cfg.scheduling: refactoring to use the simple-optimization combinator
2014-12-15 20:44:07 +01:00
Björn Lindqvist
8a011c8366
compiler.cfg.*: more docs
2014-12-15 20:44:07 +01:00
Björn Lindqvist
c810677b47
compiler.cfg.linear-scan.*: refactoring to simplify init-allocator and get rid of init-unhandled
2014-12-15 20:44:06 +01:00
Björn Lindqvist
fab478482e
compiler.cfg.linear-scan.allocation: refactoring to simplify the (allocate-registers) recursion
2014-12-15 20:44:06 +01:00
Björn Lindqvist
52c6009aeb
compiler.cfg.linear-scan.assignment: utility word heap-pop-while which lets you express expire-old-intervals and activate-new-intervals more nicely + tests
2014-12-15 20:40:49 +01:00
Björn Lindqvist
0af46ac4de
compiler.cfg.linear-scan.assignment: more docs and refactoring of the init-unhandled and assign-registers-in-block words
2014-12-15 20:40:49 +01:00
Björn Lindqvist
a7137f32ff
compiler.cfg.save-contexts: refactoring of the vocab, using the simple-optimization combinator and union classes you can shorten it a lot
2014-12-15 20:36:27 +01:00
John Benediktsson
e5c69d3e9b
compiler: try this for compiler.cfg.builder.alien.
2014-12-13 18:44:35 -08:00
John Benediktsson
a689211ae1
compiler.cfg.builder: use compiler.cfg.builder.alien.
2014-12-13 18:08:50 -08:00
John Benediktsson
c65877104e
compiler: cleanup usings.
2014-12-13 16:10:21 -08:00
John Benediktsson
46e0426795
compiler.cfg.stack-frame: fix tests.
2014-12-12 17:14:39 -08:00
John Benediktsson
1911b183a0
compiler.cfg.build-stack-frame: fix tests.
2014-12-12 15:22:22 -08:00
John Benediktsson
8f4c4ea2e1
compiler.cfg.build-stack-frame: some cleanup.
2014-12-12 11:59:23 -08:00
John Benediktsson
c3a4bdcf68
compiler.cfg.linear-scan.resolve: use if-empty.
2014-12-11 14:00:50 -08:00
John Benediktsson
068ddd6c7b
compiler: cleanup cfg passes to have stack effect ( cfg -- )
2014-12-11 12:48:43 -08:00
Björn Lindqvist
33500db79f
compiler.cfg.*: help-lint and test case fixes
2014-12-11 15:02:40 +01:00
Björn Lindqvist
08e9f18c3b
compiler.cfg.*: fix for test cases that broke due to stack effect changes
2014-12-11 14:30:47 +01:00
Björn Lindqvist
bfc0ef815b
compiler.cfg.dominance: fix for #1227 , the dom children needs to be sorted to ensure that the same instruction sequence is generated every time
2014-12-11 14:30:47 +01:00
Björn Lindqvist
628c87c5b1
compiler.cfg.utilities: adding connect-bbs and make-edges
2014-12-11 14:30:47 +01:00
Björn Lindqvist
00e2d9f116
compiler.cfg.dominance: some more docs
2014-12-11 14:30:47 +01:00
Björn Lindqvist
c85175c10c
compiler.cfg.*: new utility word apply-passes to improve the looks of long cleave's where each quotation only contains one word
2014-12-11 14:30:47 +01:00
Björn Lindqvist
e371327ec4
compiler.cfg.ssa.construction.tests: fix tc broken by previous commit
2014-12-11 14:30:47 +01:00
Björn Lindqvist
befbe0bb59
compiler.cfg.dominance: changed stack effect compute-dominance ( cfg -- cfg' ) to ( cfg -- )
2014-12-11 14:30:47 +01:00
Björn Lindqvist
e5866dfa80
compiler.cfg.*: changed stack effect of needs-predecessors from ( cfg -- cfg') to ( cfg -- )
2014-12-11 14:30:47 +01:00
Björn Lindqvist
76cb665a8d
compiler.cfg.dominance: change needs-dominance effect from ( cfg -- cfg') to ( cfg -- )
2014-12-11 14:30:46 +01:00
Björn Lindqvist
054982f24a
compiler.cfg.*: docs for compiler.cfg.dominance and compiler.cfg.ssa.construction
2014-12-11 14:30:46 +01:00
Björn Lindqvist
53b7f82368
Docs: more compiler docs
2014-12-11 14:30:46 +01:00
Björn Lindqvist
5fe9ce4235
compiler.cfg: fix stack effect of cfg-changed and predecessors changed to ( cfg -- )
2014-12-11 14:30:46 +01:00
Björn Lindqvist
a0d4e9b417
compiler.cfg.stacks.uninitialized: this compiler pass isn't used anymore -- let's get rid of it
2014-12-11 14:30:46 +01:00
Björn Lindqvist
8744d908b6
compiler.cfg.*: fix stack effect of compiler passes in optimize-cfg
...
since they all modify the cfg in place, it is better if their stack
effect is ( cfg -- ) instead of ( cfg -- cfg' )
2014-12-11 14:30:45 +01:00