zerny@google.com
5cc78d2a33
Refactored FlowGraphBuilder into a separate FlowGraph representation.
...
R=kmillikin@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10857016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10807 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-16 12:06:17 +00:00
vegorov@google.com
fe291bf0fa
Implement basic support for deferred slow path code with calls that save and restore live registers.
...
Use it to avoid spilling over stack-checks.
R=kmillikin@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10823308
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10639 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 12:47:42 +00:00
kmillikin@google.com
172ee045f3
Build and use stack maps in the SSA compiler.
...
Add a stack bitmap to the location summaries for calls that are GC
safepoints. The bitmap covers the spill slots. The register
allocator collects these bitmaps into a list and then marks live
pointer values during register allocation. When emitting code for a
call, a heap-allocated stackmap is built.
BUG=
Review URL: https://chromiumcodereview.appspot.com//10831261
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10618 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-14 06:59:24 +00:00
vegorov@google.com
1cf5cc74aa
Put PushArgument into the environment instead of raw values.
...
This allows to shorten live ranges and avoid spilling when PushArgument is the last real use of the value.
BUG=
Review URL: https://chromiumcodereview.appspot.com//10825282
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10508 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-10 14:28:02 +00:00
kmillikin@google.com
4a24120c8d
Move all register allocator environment initialization into class Environment.
...
Move the register constraints and initial live ranges of environment values
out of the register allocator and into the environment class.
R=vegorov@google.com ,srdjan@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10826184
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10342 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-07 15:53:02 +00:00
vegorov@google.com
4a24eb7ad8
Add hints when resolving phies and register constraints.
...
R=fschneider@google.com
Review URL: https://chromiumcodereview.appspot.com//10829218
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10333 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-07 11:55:42 +00:00
vegorov@google.com
f07819adb2
Ensure that ia32 build passes all tests with --use-ssa on.
...
Bugs fixed in register allocator:
- incorrect assertions in SplitAt;
- allocation finger should not cache positions that are owned by a sibling after split;
- UpdateFreeUntil should allow evicting live range with vreg 0;
- values expected in fixed locations should not cause an interference at the instruction itself, they can be evicted if need arises;
Bug fixed in deoptimization:
- parallel move resolver uses push/pop to free a scratch register for memory to memory moves, when using it for deoptimization we need to ensure that those push/pops do not interfere with actual moves;
R=srdjan@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10824165
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10287 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-06 12:24:12 +00:00
fschneider@google.com
04fa2e3547
Refactor our IL instruction for static setters.
...
We do not need a separate IL instruction anymore. Instead I generate
a normal static call and save the result in a temporary local if it
is needed.
Review URL: https://chromiumcodereview.appspot.com//10825176
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10222 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 11:14:07 +00:00
vegorov@google.com
b601fa02c7
When selecting an optimal position for SplitBetween(from, to) ensure:
...
- that loop and block structure is taken into account;
- that split sibling has proper interference with values incoming into instruction corresponding to the to position.
R=srdjan@google.com
BUG=4308
Review URL: https://chromiumcodereview.appspot.com//10850023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10208 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-03 06:29:35 +00:00
vegorov@google.com
abfb2bf67a
Implement simple spill store elimination.
...
Values that are spilled somewhere during their life-time are spilled eagerly at their definiton.
Additionally improve liverange printing used for debugging purposes.
R=srdjan@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10828115
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10155 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-02 08:45:49 +00:00
fschneider@google.com
8eee3f1899
Eliminate unnecessary deoptimization environments.
...
This CL adds a CanOptimize predicate to every instruction. Before register
allocation there is a simple pass over the IR to remove environments from
instruction that never deoptmize. This reduces the number of uses and shortens
live ranges of values resulting in better code.
Review URL: https://chromiumcodereview.appspot.com//10829098
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10115 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-01 12:09:10 +00:00
vegorov@google.com
79199170eb
Revert instruction numbering scheme to an instruction start (2*k) - instruction end (2*k + 1) one. Current instruction numbering scheme does not capture interference between temporaries and inputs correctly which in rare cases causes allocation of the same register both to the temp and to the input register.
...
Allow live range splitting at every position.
Don't reuse phi-resolution parallel move for connecting live ranges or meeting register constraints, this might cause conflicts between moves.
Allow deoptimization with environments containing spilled values.
R=kmillikin@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10831070
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10050 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-31 11:16:51 +00:00
srdjan@google.com
67de9f1323
Some cleanups.
...
Review URL: https://chromiumcodereview.appspot.com//10806099
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9874 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-25 00:25:00 +00:00
vegorov@google.com
16e25206d1
New linear scan allocator.
...
Review URL: https://chromiumcodereview.appspot.com//10800037
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9851 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-24 16:01:54 +00:00
srdjan@google.com
c490158706
Cleanups.
...
Review URL: https://chromiumcodereview.appspot.com//10809047
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9795 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-20 23:42:23 +00:00
vegorov@google.com
1bd5a9b414
Skeleton of a linear scan register allocator.
...
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10696151
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9563 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 18:52:17 +00:00
vegorov@google.com
30288c500e
Fix a bug in liveness analysis code and add more comments.
...
R=fschneider@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10657044
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9106 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 12:14:02 +00:00
vegorov@google.com
2f23dc4b60
Simple iterative liveness analysis over SSA.
...
R=fschneider@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10666026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9069 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-25 17:07:16 +00:00
fschneider@google.com
63d4ad7d5f
Add new files and data structures for the new register allocator.
...
This CL adds new files to hold the new register allocator and
adds a parallel-move instructions that will be used to insert
moves for register constraints, spills and phi-resolution.
No new functionality added yet.
Review URL: https://chromiumcodereview.appspot.com//10635020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9027 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 10:59:06 +00:00