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

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

Issue 10566021: Reapply change to GVN all HFieldGet instructions. (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 | « lib/compiler/implementation/ssa/value_set.dart ('k') | tests/language/gvn_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/variable_allocator.dart
diff --git a/lib/compiler/implementation/ssa/variable_allocator.dart b/lib/compiler/implementation/ssa/variable_allocator.dart
index 4a6b7d8dde2505587d51306a1eccc70382cbb99c..fc01e86d8de5938ea7ebb1f5da57b40c8e7cb450 100644
--- a/lib/compiler/implementation/ssa/variable_allocator.dart
+++ b/lib/compiler/implementation/ssa/variable_allocator.dart
@@ -118,7 +118,9 @@ class LiveEnvironment {
var input = instruction.checkedInput;
while (input is HCheck) input = input.checkedInput;
liveIntervals.putIfAbsent(input, () => new LiveInterval());
- liveIntervals.putIfAbsent(instruction, () => liveIntervals[input]);
+ // Unconditionally force the live interval of the HCheck to
+ // be the live interval of the instruction it is checking.
+ liveIntervals[instruction] = liveIntervals[input];
} else {
LiveInterval range = liveIntervals.putIfAbsent(
instruction, () => new LiveInterval());
@@ -142,7 +144,6 @@ class LiveEnvironment {
if (instruction is HCheck) {
// Special case the HCheck instruction to mark the actual
// checked instruction live.
- liveInstructions.putIfAbsent(instruction, () => userId);
var input = instruction.checkedInput;
while (input is HCheck) input = input.checkedInput;
liveInstructions.putIfAbsent(input, () => userId);
@@ -576,7 +577,7 @@ class SsaVariableAllocator extends HBaseVisitor {
}
return true;
}
-
+
/**
* Returns whether [instruction] dies at the instruction [at].
*/
« no previous file with comments | « lib/compiler/implementation/ssa/value_set.dart ('k') | tests/language/gvn_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698