Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(652)

Issue 1105793002: Greedy reg alloc - better splitting (Closed)

Created:
5 years, 8 months ago by Mircea Trofin
Modified:
5 years, 7 months ago
Reviewers:
dcarney, Jarin
CC:
v8-dev, Jim Stichnoth, jvoung (off chromium), Jarin
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Most of the issues so far encountered with the greedy allocator rest with the splitting mechanism. This change has: - all RegisterAllocatorTest unit tests passing, when unittest has the flags: --turbo-filter=* --always-opt --turbo-deoptimization --turbo-verify-allocation --turbo_greedy_regalloc ./tools/run-tests.py passing when providing --turbo_greedy_regalloc, but still having some failing (more than the "normal" 43) when passing all the flags. I realize just passing --turbo_greedy_regalloc does not provide full coverage, but it did uncover some bugs, still The CL centralizes the computing of split points (for "losing" intervals) with the determination of whether an interval is irreducible, and, therefore, of infinite spill weight (if an interval can't be split or spilled, it can't lose in weight comparison because there's nothing we can do to it and make progress). There are allocator efficiency opportunities I haven't yet taken (this refers to the code itself, not the generated code). For example, the above split/spill computation can be cached. My plan is to defer this to at least after we see numbers showing the value of the algorithm, and potentially do at the same time we remove the linear algorithm, if that is still the plan. At that time, we can look where some APIs best belong (e.g. weight computation may fully live and cache itself on LiveRange) In addition, the CL adds a few debug-time-only Print APIs I found very useful: on demand (while in GDB) dump of the code, live range info (use positions & operand description, and intervals), etc. BUG= Committed: https://crrev.com/cd481a7dfdb1b698758d154d01169302992a5443 Cr-Commit-Position: refs/heads/master@{#28185}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Total comments: 11

Patch Set 7 : #

Total comments: 3

Patch Set 8 : #

Patch Set 9 : Just a rebase #

Total comments: 10

Patch Set 10 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+305 lines, -52 lines) Patch
M src/compiler/register-allocator.h View 1 2 3 4 5 6 7 8 9 6 chunks +26 lines, -3 lines 0 comments Download
M src/compiler/register-allocator.cc View 1 2 3 4 5 6 7 8 9 14 chunks +279 lines, -49 lines 0 comments Download

Messages

Total messages: 17 (4 generated)
Mircea Trofin
Note: I saw the failing static initializers test fail, I'm investigating, but I suppose we ...
5 years, 7 months ago (2015-04-29 15:33:45 UTC) #2
dcarney
https://codereview.chromium.org/1105793002/diff/100001/src/compiler/register-allocator.h File src/compiler/register-allocator.h (right): https://codereview.chromium.org/1105793002/diff/100001/src/compiler/register-allocator.h#newcode12 src/compiler/register-allocator.h:12: #include <iostream> this is not allowed - adds static ...
5 years, 7 months ago (2015-04-29 17:24:13 UTC) #3
Mircea Trofin
https://codereview.chromium.org/1105793002/diff/100001/src/compiler/register-allocator.h File src/compiler/register-allocator.h (right): https://codereview.chromium.org/1105793002/diff/100001/src/compiler/register-allocator.h#newcode12 src/compiler/register-allocator.h:12: #include <iostream> On 2015/04/29 17:24:13, dcarney wrote: > this ...
5 years, 7 months ago (2015-04-29 17:35:33 UTC) #4
dcarney
> I'd still have that stream available under DEBUG only, though. that wouldn't be consistent ...
5 years, 7 months ago (2015-04-29 18:13:44 UTC) #5
dcarney
couple minor comments, everything else looks fine is you clean up all the printing stuff ...
5 years, 7 months ago (2015-04-29 18:18:35 UTC) #6
dcarney
https://codereview.chromium.org/1105793002/diff/120001/src/compiler/register-allocator.cc File src/compiler/register-allocator.cc (right): https://codereview.chromium.org/1105793002/diff/120001/src/compiler/register-allocator.cc#newcode909 src/compiler/register-allocator.cc:909: std::ostream& operator<<(std::ostream& os, this should come after the live ...
5 years, 7 months ago (2015-04-30 06:01:32 UTC) #7
Mircea Trofin
https://codereview.chromium.org/1105793002/diff/100001/src/compiler/register-allocator.cc File src/compiler/register-allocator.cc (right): https://codereview.chromium.org/1105793002/diff/100001/src/compiler/register-allocator.cc#newcode2576 src/compiler/register-allocator.cc:2576: ZoneSet<LiveRange*> local_conflicts(data()->allocation_zone()); On 2015/04/29 18:18:35, dcarney wrote: > the ...
5 years, 7 months ago (2015-04-30 18:16:49 UTC) #9
Mircea Trofin
Updated after latest rebase
5 years, 7 months ago (2015-04-30 22:31:34 UTC) #10
dcarney
lgtm with nits https://codereview.chromium.org/1105793002/diff/160001/src/compiler/register-allocator.cc File src/compiler/register-allocator.cc (right): https://codereview.chromium.org/1105793002/diff/160001/src/compiler/register-allocator.cc#newcode2683 src/compiler/register-allocator.cc:2683: return (TryReuseSpillForPhi(range)); extra () https://codereview.chromium.org/1105793002/diff/160001/src/compiler/register-allocator.h File ...
5 years, 7 months ago (2015-05-01 07:56:04 UTC) #11
Mircea Trofin
https://codereview.chromium.org/1105793002/diff/160001/src/compiler/register-allocator.cc File src/compiler/register-allocator.cc (right): https://codereview.chromium.org/1105793002/diff/160001/src/compiler/register-allocator.cc#newcode2683 src/compiler/register-allocator.cc:2683: return (TryReuseSpillForPhi(range)); On 2015/05/01 07:56:03, dcarney wrote: > extra ...
5 years, 7 months ago (2015-05-01 15:06:33 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1105793002/180001
5 years, 7 months ago (2015-05-01 15:06:52 UTC) #15
commit-bot: I haz the power
Committed patchset #10 (id:180001)
5 years, 7 months ago (2015-05-01 15:31:37 UTC) #16
commit-bot: I haz the power
5 years, 7 months ago (2015-05-01 15:32:00 UTC) #17
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/cd481a7dfdb1b698758d154d01169302992a5443
Cr-Commit-Position: refs/heads/master@{#28185}

Powered by Google App Engine
This is Rietveld 408576698