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

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

Issue 10578038: Revert GVN changes while investigating (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/variable_allocator.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/nodes.dart
diff --git a/lib/compiler/implementation/ssa/nodes.dart b/lib/compiler/implementation/ssa/nodes.dart
index 5b2d7a7dd8a5e3d8fa7164f4c65abdcbf8275c48..c5525630131108cd5bea3fcf5d88119f22eadc0d 100644
--- a/lib/compiler/implementation/ssa/nodes.dart
+++ b/lib/compiler/implementation/ssa/nodes.dart
@@ -992,10 +992,6 @@ abstract class HCheck extends HInstruction {
HCheck(inputs) : super(inputs);
HInstruction get checkedInput() => inputs[0];
bool isStatement() => true;
- void prepareGvn() {
- assert(!hasSideEffects());
- setUseGvn();
- }
}
class HTypeGuard extends HCheck {
@@ -1006,6 +1002,11 @@ class HTypeGuard extends HCheck {
HTypeGuard(this.guardedType, this.state, List<HInstruction> env) : super(env);
+ void prepareGvn() {
+ assert(!hasSideEffects());
+ setUseGvn();
+ }
+
HInstruction get guarded() => inputs[checkedInputIndex];
HInstruction get checkedInput() => guarded;
@@ -1042,6 +1043,11 @@ class HBoundsCheck extends HCheck {
HInstruction get index() => inputs[0];
bool isControlFlow() => true;
+ void prepareGvn() {
+ assert(!hasSideEffects());
+ setUseGvn();
+ }
+
HType get guaranteedType() => HType.INTEGER;
accept(HVisitor visitor) => visitor.visitBoundsCheck(this);
@@ -1058,6 +1064,11 @@ class HIntegerCheck extends HCheck {
HInstruction get value() => inputs[0];
bool isControlFlow() => true;
+ void prepareGvn() {
+ assert(!hasSideEffects());
+ setUseGvn();
+ }
+
HType get guaranteedType() => HType.INTEGER;
accept(HVisitor visitor) => visitor.visitIntegerCheck(this);
@@ -1231,8 +1242,7 @@ class HInvokeInterceptor extends HInvokeStatic {
void prepareGvn() {
if (isLengthGetterOnStringOrArray()) {
- setUseGvn();
- setDependsOnSomething();
+ clearAllSideEffects();
} else {
setAllSideEffects();
}
@@ -2281,6 +2291,7 @@ class HTypeConversion extends HCheck {
accept(HVisitor visitor) => visitor.visitTypeConversion(this);
+ bool hasSideEffects() => kind != NO_CHECK;
bool isStatement() => kind == ARGUMENT_TYPE_CHECK;
bool isControlFlow() => kind == ARGUMENT_TYPE_CHECK;
}
« no previous file with comments | « no previous file | lib/compiler/implementation/ssa/variable_allocator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698