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

Unified Diff: lib/compiler/implementation/ssa/variable_allocator.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/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];
ngeoffray 2012/06/15 19:45:33 Nice catch! Hope that was easy to spot :) I should
} 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].
*/
« lib/compiler/implementation/ssa/tracer.dart ('K') | « lib/compiler/implementation/ssa/tracer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698