Commit Graph

20 Commits

Author SHA1 Message Date
vegorov@chromium.org
c411adca55 Adjust pointer maps for branches when connecting live ranges.
Review URL: http://codereview.chromium.org/6541024

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6858 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-18 16:29:41 +00:00
fschneider@chromium.org
17da434b29 Remove instruction summaries.
Instead of constructing a temporary container for all LOperands of each
instruction, the register works directly on the LIR instructions that
 provide an abstract interface for input/output/temp operands.

This saves allocation of zone memory and speeds up LIR construction,
but makes iterating over all uses in the register allocator slightly
more expensive because environment uses are stored in a linked list of
environments. We can fix this by using a flat representation of LOperands.


Review URL: http://codereview.chromium.org/6352006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6638 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-04 13:28:23 +00:00
vegorov@chromium.org
03e1036fde Fix control flow resolution bug in lithium register allocator.
Review URL: http://codereview.chromium.org/6312057

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6556 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-02-01 14:33:23 +00:00
fschneider@chromium.org
5b2dff9806 Remove unused function AddGapMove from the register allocator.
Review URL: http://codereview.chromium.org/6355009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6420 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-20 14:37:28 +00:00
fschneider@chromium.org
ac0b1ded7b Move LOperand class to lithium.h and move implementations out of .h into .cc files.
Review URL: http://codereview.chromium.org/6378004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6400 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-19 13:55:56 +00:00
kmillikin@chromium.org
437914da90 Change the algorithm and generated code for parallel moves on IA32.
Instead of spilling and then immediately restoring eax to resolve
memory to memory moves, the gap move resolver now tracks registers
that are known to be free and uses one if available.  If not it spills
but restores lazily when the spilled value is needed or at the end of
the algorithm.

Instead of using esi for resolving cycles and assuming it is free to
overwrite because it can be rematerialized, the gap move resolver now
resolves cycles using swaps, possibly using a free register as above.

The algorithm is also changed to be simpler: a recursive depth-first
traversal of the move dependence graph.  It uses a list of moves to be
performed (because it mutates the moves themselves), but does not use
any auxiliary structure other than the control stack.  It does not
build up a separate list of scheduled moves to be interpreted by the
code generate, but emits code on the fly.

Review URL: http://codereview.chromium.org/6263005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6344 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-17 11:25:36 +00:00
fschneider@chromium.org
3ff2cebd96 Remove unnecessary recording of temp operands in the register allocator.
When processing register contraints we used to add writable input operands
also as temp operands to the same instruction.

This does not seem necessary since we create a fresh virtual register
for writable inputs and insert a definition in the gap before the instruction.

Review URL: http://codereview.chromium.org/6350002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6342 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-17 10:08:58 +00:00
sgjesse@chromium.org
7311e10fdb Optimize instanceof further
If the instance of is performed against what is beliwed to be a constant global function inline the instance of check and have the call to the instanceof stub in deferred code. The inlined check will be patched by the instanceof stub when called from deferred code. This is indicated by the lithium instruction LInstanceOfKnownGlobal.

To help the patching the delta from the return address to the patch site is placed just below the return address in the edi slot of the pushad/popad ares. This is safe because the edi register (which is pushed last) is a temporary for the lithium instruction.

As the instanceof stub can call other JavaScript an additional marking for saving all double registers have been added.

Also tweaked the instanceof stub to produce true/false objects instead of 0/1 for the case with deferred code.
Review URL: http://codereview.chromium.org/5990005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-05 11:17:37 +00:00
fschneider@chromium.org
5bd44d212a Remove unused policy from register allocator.
DefineSameAsAny is never used and currently does exactly the 
same as DefineSameAsFirst.

Review URL: http://codereview.chromium.org/6025014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6163 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 14:35:01 +00:00
vegorov@chromium.org
4dc3282556 Add constraints verification to LAllocator::MarkAsCall().
Review URL: http://codereview.chromium.org/6069012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6149 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-04 11:36:20 +00:00
vegorov@chromium.org
1cf6f3a26c Move first_artificial_register_ initialization to the right place.
Review URL: http://codereview.chromium.org/6009010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6139 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-03 19:16:29 +00:00
vegorov@chromium.org
11d1188e83 Remember required register kind when creating artificial virtual register.
Review URL: http://codereview.chromium.org/6065010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-01-03 17:02:15 +00:00
fschneider@chromium.org
cdc7d3908e Fix a SEGV in the register allocator.
This occasionally caused the regress-806 unit test to crash.

Review URL: http://codereview.chromium.org/5913002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-16 12:01:22 +00:00
vegorov@chromium.org
ed59e77256 Fix several register allocation issues revealed by fuzzer:
- LIsObject had incorrect contraint for value input;
- Temporaries had incorrect lifetime intervals;
- Live ranges for live_out values was not covering the whole block.

Review URL: http://codereview.chromium.org/5899002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6038 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 18:13:02 +00:00
vegorov@chromium.org
655b30858d Fix issue 982.
When splitting at the beginning of a use interval assign coinciding position to the split child instead of leaving it to parent.

BUG=v8:982

Review URL: http://codereview.chromium.org/5898001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6031 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-15 14:35:46 +00:00
vegorov@chromium.org
65f98b1e7a Fix issue 962.
SplitBetween (formely known as Split with 3 arguments) should select split position from [start, end] instead of [start, end[. This should also improve allocation quality (remove certain redundant move patterns).

Also some minor renaming and refactoring to make register allocator code more readable.

BUG=v8:962
TEST=test/mjsunit/regress/regress-962.js

Review URL: http://codereview.chromium.org/5720001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5969 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-10 14:25:10 +00:00
vegorov@chromium.org
7c87f90c62 Remove NearestNextGapPos. It is not used anymore.
Remove uses of NearestGapPos in splitting helpers. We can split at any position.

Review URL: http://codereview.chromium.org/5605004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5937 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 14:51:49 +00:00
kasperl@chromium.org
90b3370374 Update V8 to version 3.0 (re-land r5920).
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5922 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 11:31:57 +00:00
kasperl@chromium.org
51b494d096 Revert r5920. Will re-land shortly.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 11:01:02 +00:00
kasperl@chromium.org
e5860bd6a8 Update V8 to version 3.0.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5920 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-12-07 09:11:56 +00:00