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

Unified Diff: lib/compiler/implementation/ssa/optimize.dart

Issue 10563002: Reapply change to GVN all HFieldGet instructions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor style fix. Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/compiler/implementation/ssa/optimize.dart
diff --git a/lib/compiler/implementation/ssa/optimize.dart b/lib/compiler/implementation/ssa/optimize.dart
index ab0b54f1d689146ea7508cf6ebb1c50005375343..5d33e22aac8bdeea839043241956dfc2fb504bff 100644
--- a/lib/compiler/implementation/ssa/optimize.dart
+++ b/lib/compiler/implementation/ssa/optimize.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -711,12 +711,11 @@ class SsaDeadCodeEliminator extends HGraphVisitor implements OptimizationPhase {
final String name = "SsaDeadCodeEliminator";
static bool isDeadCode(HInstruction instruction) {
- // TODO(ngeoffray): the way we handle side effects is not right
- // (e.g. branching instructions have side effects).
return !instruction.hasSideEffects()
&& instruction.usedBy.isEmpty()
&& instruction is !HCheck
- && instruction is !HTypeGuard;
+ && instruction is !HTypeGuard
+ && !instruction.isControlFlow();
}
void visitGraph(HGraph graph) {

Powered by Google App Engine
This is Rietveld 408576698