DescriptionImplement 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 : #
Messages
Total messages: 4 (0 generated)
|