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

Issue 99573005: Add mutable double boxes for fields. (Closed)

Created:
7 years ago by Florian Schneider
Modified:
7 years ago
Reviewers:
zra, Cutch, srdjan
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Add mutable double boxes for fields. This allows the optimizing compiler to generate unboxed loads/stores to fields containing double values. The double value is stored in a reusable double object. Unboxed loads/stores are generated for optimized code. Unoptimized code allocates a new double on loads. To avoid performance regressions for fields that are only written few times (e.g. only in the constructor) I put a heuristic in place that compares the usage count of setters and getters. Unboxed operations are only generated if the setter is invoked a significant amount of times (threshold is 10% of getter invocations). The CL is so big because it changes the way LocationSummmary is allocated: We now have a bit to generate different summaries for optimized and unoptimized code. R=srdjan@google.com Committed: https://code.google.com/p/dart/source/detail?r=31164

Patch Set 1 #

Total comments: 42

Patch Set 2 : #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1479 lines, -663 lines) Patch
M runtime/vm/flow_graph_allocator.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/flow_graph_builder.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M runtime/vm/flow_graph_builder.cc View 1 2 1 chunk +2 lines, -8 lines 0 comments Download
M runtime/vm/flow_graph_compiler.cc View 1 2 4 chunks +9 lines, -3 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 2 4 chunks +39 lines, -1 line 0 comments Download
M runtime/vm/il_printer.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/intermediate_language.h View 1 2 24 chunks +45 lines, -87 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 2 17 chunks +40 lines, -16 lines 0 comments Download
M runtime/vm/intermediate_language_arm.cc View 1 2 94 chunks +329 lines, -134 lines 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 1 2 94 chunks +331 lines, -138 lines 0 comments Download
M runtime/vm/intermediate_language_mips.cc View 1 2 94 chunks +327 lines, -136 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 1 2 94 chunks +330 lines, -138 lines 0 comments Download
M runtime/vm/object.h View 1 2 2 chunks +23 lines, -0 lines 0 comments Download
M runtime/vm/object.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Florian Schneider
7 years ago (2013-12-13 12:59:54 UTC) #1
srdjan
Adding Zach for Mips/Arm changes. "APP" means "Add parentheses please". https://codereview.chromium.org/99573005/diff/1/runtime/vm/flow_graph_compiler.cc File runtime/vm/flow_graph_compiler.cc (right): https://codereview.chromium.org/99573005/diff/1/runtime/vm/flow_graph_compiler.cc#newcode640 ...
7 years ago (2013-12-13 18:13:16 UTC) #2
Cutch
https://codereview.chromium.org/99573005/diff/1/runtime/vm/intermediate_language.h File runtime/vm/intermediate_language.h (right): https://codereview.chromium.org/99573005/diff/1/runtime/vm/intermediate_language.h#newcode4192 runtime/vm/intermediate_language.h:4192: return IsUnboxedLoad() ? kUnboxedDouble : kTagged; Can we not ...
7 years ago (2013-12-13 19:48:43 UTC) #3
zra
https://codereview.chromium.org/99573005/diff/1/runtime/vm/intermediate_language_mips.cc File runtime/vm/intermediate_language_mips.cc (right): https://codereview.chromium.org/99573005/diff/1/runtime/vm/intermediate_language_mips.cc#newcode138 runtime/vm/intermediate_language_mips.cc:138: comparison()->InitializeLocationSummary(optimizing); Same problem as ARM? https://codereview.chromium.org/99573005/diff/1/runtime/vm/intermediate_language_mips.cc#newcode1686 runtime/vm/intermediate_language_mips.cc:1686: if (IsUnboxedStore() ...
7 years ago (2013-12-13 21:06:30 UTC) #4
srdjan
LGTM https://codereview.chromium.org/99573005/diff/1/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/99573005/diff/1/runtime/vm/flow_graph_optimizer.cc#newcode3521 runtime/vm/flow_graph_optimizer.cc:3521: Function::Handle(owner.LookupSetterFunction(field_name)); Below is an important heuristic, add brief ...
7 years ago (2013-12-13 22:12:05 UTC) #5
Florian Schneider
https://codereview.chromium.org/99573005/diff/1/runtime/vm/flow_graph_compiler.cc File runtime/vm/flow_graph_compiler.cc (right): https://codereview.chromium.org/99573005/diff/1/runtime/vm/flow_graph_compiler.cc#newcode640 runtime/vm/flow_graph_compiler.cc:640: if (load_node.field().guarded_cid() == kDynamicCid) { On 2013/12/13 18:13:17, srdjan ...
7 years ago (2013-12-16 13:08:09 UTC) #6
Florian Schneider
7 years ago (2013-12-16 15:11:47 UTC) #7
Message was sent while issue was closed.
Committed patchset #3 manually as r31164 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698