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

Issue 1501363002: [turbofan] regalloc: model context and function mark as reg-defined. (Closed)

Created:
5 years ago by Mircea Trofin
Modified:
5 years ago
Reviewers:
Benedikt Meurer, Jarin
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[turbofan] regalloc: model context and function mark as reg-defined. If we model them as memory operands ("SpillOperands"), as we currently do, they are treated by the register allocator as being defined in memory, so spilling them up to the first use requiring them in a register is free. That's not the case for context and function marker. They come in registers, and the frame construction also pushes them on the stack. This conflicts with the goals of frame elision: the allocator should avoid eagerly spilling them, which would force a frame construction; also, their not being spilled, should frame elision succeed for the first block, means modeling them as spill operands incorrect. The natural choice would be to fully decouple their spilling from frame construction, and let the register allocator spill them. That means they need to be presented to the register allocator as vanilla live ranges, with pre-assigned spill slots. The main challenge there is that not all instructions (mainly, stack checks) list their dependency on these ranges being spilled. In this change, we change the model but leave the frame construction as-is. This has the benefit that it unblocks frame elision, but has the drawback that we may see double spills in the case where these live ranges spill only in deferred blocks. I plan to enable frame elision next, after which tackle this issue with spilling. BUG=v8:4533 LOG=N Committed: https://crrev.com/0b1261439b53e8d4302d78ecff04ed8b0c46ae58 Cr-Commit-Position: refs/heads/master@{#32775}

Patch Set 1 : #

Total comments: 2

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -13 lines) Patch
M src/compiler/register-allocator.h View 1 4 chunks +8 lines, -0 lines 0 comments Download
M src/compiler/register-allocator.cc View 1 6 chunks +21 lines, -13 lines 0 comments Download

Messages

Total messages: 15 (9 generated)
Mircea Trofin
5 years ago (2015-12-07 06:17:08 UTC) #5
Jarin
Modulo the overkill data structure, the change lgtm. https://codereview.chromium.org/1501363002/diff/40001/src/compiler/register-allocator.h File src/compiler/register-allocator.h (right): https://codereview.chromium.org/1501363002/diff/40001/src/compiler/register-allocator.h#newcode838 src/compiler/register-allocator.h:838: ZoneMap<TopLevelLiveRange*, ...
5 years ago (2015-12-10 18:32:59 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1501363002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1501363002/60001
5 years ago (2015-12-11 02:17:14 UTC) #10
Mircea Trofin
https://codereview.chromium.org/1501363002/diff/40001/src/compiler/register-allocator.h File src/compiler/register-allocator.h (right): https://codereview.chromium.org/1501363002/diff/40001/src/compiler/register-allocator.h#newcode838 src/compiler/register-allocator.h:838: ZoneMap<TopLevelLiveRange*, int> preassigned_slot_ranges_; On 2015/12/10 18:32:59, Jarin wrote: > ...
5 years ago (2015-12-11 02:17:18 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:60001)
5 years ago (2015-12-11 02:43:54 UTC) #13
commit-bot: I haz the power
5 years ago (2015-12-11 02:44:16 UTC) #15
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/0b1261439b53e8d4302d78ecff04ed8b0c46ae58
Cr-Commit-Position: refs/heads/master@{#32775}

Powered by Google App Engine
This is Rietveld 408576698