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

Issue 11361161: Try allocating loop phi into a register even if phi has only unconstrained uses but there are cheap… (Closed)

Created:
8 years, 1 month ago by Vyacheslav Egorov (Google)
Modified:
8 years, 1 month ago
Reviewers:
Florian Schneider
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Try allocating loop phi into a register even if phi has only unconstrained uses but there are cheap eviction candidates: values that come into the loop and have only unconstrained uses in it. When spilling a value inside the loop that has only unconstrained uses in this loop move spilling point outside of the loop. This tweaks allow to minimize amount of memory moves on loop back edges. R=fschneider@google.com BUG= Committed: https://code.google.com/p/dart/source/detail?r=14673

Patch Set 1 #

Total comments: 14

Patch Set 2 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+166 lines, -5 lines) Patch
M runtime/vm/flow_graph_allocator.h View 1 6 chunks +50 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_allocator.cc View 1 9 chunks +116 lines, -5 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Vyacheslav Egorov (Google)
8 years, 1 month ago (2012-11-08 01:26:54 UTC) #1
Florian Schneider
lgtm https://codereview.chromium.org/11361161/diff/1/runtime/vm/flow_graph_allocator.cc File runtime/vm/flow_graph_allocator.cc (right): https://codereview.chromium.org/11361161/diff/1/runtime/vm/flow_graph_allocator.cc#newcode724 runtime/vm/flow_graph_allocator.cc:724: const intptr_t is_loop_header = join->loop_info() != NULL; Move ...
8 years, 1 month ago (2012-11-08 02:05:36 UTC) #2
Vyacheslav Egorov (Google)
8 years, 1 month ago (2012-11-08 02:13:43 UTC) #3
Thank you for the review.

Landing.

https://codereview.chromium.org/11361161/diff/1/runtime/vm/flow_graph_allocat...
File runtime/vm/flow_graph_allocator.cc (right):

https://codereview.chromium.org/11361161/diff/1/runtime/vm/flow_graph_allocat...
runtime/vm/flow_graph_allocator.cc:724: const intptr_t is_loop_header =
join->loop_info() != NULL;
On 2012/11/08 02:05:36, Florian Schneider wrote:
> Move this down to the use.

Done.

https://codereview.chromium.org/11361161/diff/1/runtime/vm/flow_graph_allocat...
runtime/vm/flow_graph_allocator.cc:1525: from));
On 2012/11/08 02:05:36, Florian Schneider wrote:
> Please make sure that this code is covered in our tests.

Done.

https://codereview.chromium.org/11361161/diff/1/runtime/vm/flow_graph_allocat...
runtime/vm/flow_graph_allocator.cc:1703: } else {
On 2012/11/08 02:05:36, Florian Schneider wrote:
> } else if (interval->start() < loop_end) {

Done.

https://codereview.chromium.org/11361161/diff/1/runtime/vm/flow_graph_allocat...
runtime/vm/flow_graph_allocator.cc:1721: for (int reg = 0; reg <
NumberOfRegisters(); ++reg) {
On 2012/11/08 02:05:36, Florian Schneider wrote:
> intptr_t?

Done.

https://codereview.chromium.org/11361161/diff/1/runtime/vm/flow_graph_allocat...
runtime/vm/flow_graph_allocator.cc:1733: // If a loop phi has no register uses
we might still want to allocate it
On 2012/11/08 02:05:36, Florian Schneider wrote:
> Please split this 4-line sentence into simpler phrases.

Done.

https://codereview.chromium.org/11361161/diff/1/runtime/vm/flow_graph_allocat...
runtime/vm/flow_graph_allocator.cc:1736: // cheaply evicated i.e. it has no
register beneficial uses inside the
On 2012/11/08 02:05:36, Florian Schneider wrote:
> s/evicated/evicted/g

Done.

https://codereview.chromium.org/11361161/diff/1/runtime/vm/flow_graph_allocat...
runtime/vm/flow_graph_allocator.cc:1741: !(unallocated->is_loop_phi() &&
HasCheapEvictionCandidate(unallocated))) {
On 2012/11/08 02:05:36, Florian Schneider wrote:
> Please make sure that this part is hit in our tests.

Done.

Powered by Google App Engine
This is Rietveld 408576698