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

Issue 1305393003: [turbofan] Deferred blocks splintering. (Closed)

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

Description

[turbofan] Deferred blocks splintering. This change encompasses what is necessary to enable stack checks in loops without suffering large regressions. Primarily, it consists of a new mechanism for dealing with deferred blocks by "splintering", rather than splitting, inside deferred blocks. My initial change was splitting along deferred block boundaries, but the regression introduced by stackchecks wasn't resolved conclusively. After investigation, it appears that just splitting ranges along cold block boundaries leads to a greater opportunity for moves on the hot path, hence the suboptimal outcome. The alternative "splinters" ranges rather than splitting them. While splitting creates 2 ranges and links them (parent-child), in contrast, splintering creates a new independent range with no parent-child relation to the original. The original range appears as if it has a liveness hole in the place of the splintered one. All thus obtained ranges are then register allocated with no change to the register allocator. The splinters (cold blocks) do not conflict with the hot path ranges, by construction. The hot path ones have less pressure to split, because we remove a source of conflicts. After allocation, we merge the splinters back to their original ranges and continue the pipeline. We leverage the previous changes made for deferred blocks (determining where to spill, for example). Committed: https://crrev.com/5d954d650688a2f069f0ff7693be57f5995bdf03 Cr-Commit-Position: refs/heads/master@{#30357}

Patch Set 1 #

Total comments: 24

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+541 lines, -256 lines) Patch
M BUILD.gn View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/bit-vector.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/ast-graph-builder.cc View 1 chunk +1 line, -3 lines 0 comments Download
M src/compiler/instruction.h View 1 3 chunks +11 lines, -3 lines 0 comments Download
M src/compiler/instruction.cc View 1 chunk +2 lines, -1 line 0 comments Download
A src/compiler/live-range-separator.h View 1 1 chunk +60 lines, -0 lines 0 comments Download
A src/compiler/live-range-separator.cc View 1 1 chunk +172 lines, -0 lines 0 comments Download
M src/compiler/pipeline.cc View 5 chunks +19 lines, -9 lines 0 comments Download
D src/compiler/preprocess-live-ranges.h View 1 chunk +0 lines, -35 lines 0 comments Download
D src/compiler/preprocess-live-ranges.cc View 1 chunk +0 lines, -169 lines 0 comments Download
M src/compiler/register-allocator.h View 14 chunks +48 lines, -6 lines 0 comments Download
M src/compiler/register-allocator.cc View 1 12 chunks +216 lines, -23 lines 0 comments Download
M src/flag-definitions.h View 1 1 chunk +6 lines, -1 line 0 comments Download
M test/unittests/compiler/register-allocator-unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M tools/gyp/v8.gyp View 1 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (4 generated)
Mircea Trofin
The change may be introduced as a few smaller changes, namely: - renaming the preprocess-live-ranges.{cc|h} ...
5 years, 4 months ago (2015-08-24 01:51:06 UTC) #2
Benedikt Meurer
Looking good with some comments. https://codereview.chromium.org/1305393003/diff/1/src/compiler/instruction.h File src/compiler/instruction.h (right): https://codereview.chromium.org/1305393003/diff/1/src/compiler/instruction.h#newcode784 src/compiler/instruction.h:784: Nit: please add operator!= ...
5 years, 4 months ago (2015-08-24 04:33:26 UTC) #3
Mircea Trofin
https://codereview.chromium.org/1305393003/diff/1/src/compiler/instruction.h File src/compiler/instruction.h (right): https://codereview.chromium.org/1305393003/diff/1/src/compiler/instruction.h#newcode784 src/compiler/instruction.h:784: On 2015/08/24 04:33:26, Benedikt Meurer wrote: > Nit: please ...
5 years, 4 months ago (2015-08-24 20:55:10 UTC) #6
Benedikt Meurer
Thanks. LGTM
5 years, 4 months ago (2015-08-25 04:54:15 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1305393003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1305393003/60001
5 years, 4 months ago (2015-08-25 14:46:12 UTC) #9
commit-bot: I haz the power
Committed patchset #2 (id:60001)
5 years, 4 months ago (2015-08-25 14:47:32 UTC) #10
commit-bot: I haz the power
5 years, 4 months ago (2015-08-25 14:47:43 UTC) #11
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/5d954d650688a2f069f0ff7693be57f5995bdf03
Cr-Commit-Position: refs/heads/master@{#30357}

Powered by Google App Engine
This is Rietveld 408576698