Chromium Code Reviews| Index: pkg/compiler/lib/src/ssa/optimize.dart |
| diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart |
| index d4e546842a3747165e85e2eb5aa7fe52b504655d..8b946af927c5743811020d055e367206dfbd514d 100644 |
| --- a/pkg/compiler/lib/src/ssa/optimize.dart |
| +++ b/pkg/compiler/lib/src/ssa/optimize.dart |
| @@ -55,6 +55,7 @@ class SsaOptimizerTask extends CompilerTask { |
| new SsaTypePropagator(compiler), |
| new SsaCodeMotion(), |
| new SsaLoadElimination(compiler), |
| + new SsaRedundantPhiEliminator(), |
| new SsaDeadPhiEliminator(), |
| new SsaTypePropagator(compiler), |
| new SsaValueRangeAnalyzer(compiler, constantSystem, this, work), |
| @@ -841,6 +842,19 @@ class SsaInstructionSimplifier extends HBaseVisitor |
| return new HFieldSet(field, receiver, value); |
| } |
| + HInstruction visitInvokeStatic(HInvokeStatic node) { |
| + if (node.element == backend.getThrowConcurrentModificationError()) { |
|
sra1
2015/04/16 19:27:09
If we agree on this general approach I will add an
|
| + if (node.inputs.length == 2) { |
| + HInstruction firstArgument = node.inputs[0]; |
| + if (firstArgument is HConstant) { |
| + HConstant constant = firstArgument; |
| + if (constant.constant.isTrue) return constant; |
| + } |
| + } |
| + } |
| + return node; |
| + } |
| + |
| HInstruction visitStringConcat(HStringConcat node) { |
| // Simplify string concat: |
| // |