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

Issue 143263010: Implement simple dead store elimination. (Closed)

Created:
6 years, 11 months ago by Florian Schneider
Modified:
6 years, 7 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Implement simple dead store elimination. This optimization is the dual to load elimination. It uses the same infrastructure for handling aliasing. Since dead store elimination is a backward data-flow analysis it inherits from LivenessAnalysis. Instead of eliminating upward exposed loads, it eliminates downward exposed stores. First local intra-block analysis is done in ComputeInitialSets. Afte the fixed point iteration EliminateDeadStores performs the global optimization on downward exposed stores in each block. Only fully dead stores are eliminated. No partially dead stores yet. Example: 1: o.x = null; 2: if (cond) { 3: o.x = 1; 4: } else { 5: o.x = 2; 6: } The store in line 1 is fully dead and will be removed. Note that any deoptimization in "cond" will make the store only partially dead and it won't be removed yet. R=vegorov@google.com Committed: https://code.google.com/p/dart/source/detail?r=35909

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : fixed bug with stores to unboxed fields #

Patch Set 7 : rebased #

Total comments: 6

Patch Set 8 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+385 lines, -25 lines) Patch
M runtime/vm/compiler.cc View 1 2 3 4 5 6 2 chunks +10 lines, -6 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.h View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 2 3 4 5 6 7 16 chunks +239 lines, -19 lines 0 comments Download
M runtime/vm/intermediate_language.h View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
A tests/language/vm/store_elimination_vm_test.dart View 1 2 3 4 5 6 7 1 chunk +122 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Florian Schneider
6 years, 7 months ago (2014-05-08 12:21:56 UTC) #1
Vyacheslav Egorov (Google)
LGTM https://codereview.chromium.org/143263010/diff/390001/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/143263010/diff/390001/runtime/vm/flow_graph_optimizer.cc#newcode7161 runtime/vm/flow_graph_optimizer.cc:7161: if (IsStoreInstr(instr)) { can't you use is_store here? ...
6 years, 7 months ago (2014-05-08 12:53:20 UTC) #2
Florian Schneider
https://codereview.chromium.org/143263010/diff/390001/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/143263010/diff/390001/runtime/vm/flow_graph_optimizer.cc#newcode7161 runtime/vm/flow_graph_optimizer.cc:7161: if (IsStoreInstr(instr)) { On 2014/05/08 12:53:20, Vyacheslav Egorov (Google) ...
6 years, 7 months ago (2014-05-08 14:21:43 UTC) #3
Florian Schneider
6 years, 7 months ago (2014-05-08 14:26:27 UTC) #4
Message was sent while issue was closed.
Committed patchset #8 manually as r35909 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698