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

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

Issue 15917017: Don't let HCheck instructions prevent GVN. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « sdk/lib/_internal/compiler/implementation/ssa/nodes.dart ('k') | tests/compiler/dart2js/gvn_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart (revision 23842)
+++ sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart (working copy)
@@ -233,7 +233,7 @@
// [HCheck] will share the same live ranges.
if (instruction is HCheck) {
HCheck check = instruction;
- HInstruction checked = check.unwrap();
+ HInstruction checked = check.nonCheck();
if (!generateAtUseSite.contains(checked)) {
environment.add(checked, instructionId);
}
@@ -248,7 +248,7 @@
// interval as the instruction it is checking.
if (instruction is HCheck) {
HCheck check = instruction;
- HInstruction checked = check.unwrap();
+ HInstruction checked = check.nonCheck();
if (!generateAtUseSite.contains(checked)) {
liveIntervals.putIfAbsent(checked, () => new LiveInterval());
// Unconditionally force the live ranges of the HCheck to
@@ -625,12 +625,7 @@
if (instruction is HParameterValue) return true;
if (instruction.usedBy.isEmpty) return false;
if (generateAtUseSite.contains(instruction)) return false;
- // A [HCheck] instruction needs a name only if its
- // checked input does not have a fixed name or value.
- if (instruction is HCheck) {
- return !instruction.unwrap().isCodeMotionInvariant();
- }
- return true;
+ return !instruction.nonCheck().isCodeMotionInvariant();
}
/**
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/nodes.dart ('k') | tests/compiler/dart2js/gvn_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698