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

Unified Diff: tests/language/load_to_load_forwarding_vm_test.dart

Issue 17577007: Ensure that allocation sinking candidates are classified as not-aliased before final load forwardin… (Closed) Base URL: https://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 | « runtime/vm/flow_graph_optimizer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/load_to_load_forwarding_vm_test.dart
diff --git a/tests/language/load_to_load_forwarding_vm_test.dart b/tests/language/load_to_load_forwarding_vm_test.dart
index b77854fc92a5a7042c8705775ac52a42dbac1388..ecbcd4aee0df60ab516b5d95ef4d51becb096b57 100644
--- a/tests/language/load_to_load_forwarding_vm_test.dart
+++ b/tests/language/load_to_load_forwarding_vm_test.dart
@@ -71,6 +71,24 @@ testPhiConvertions(f, arr) {
return arr[0];
}
+class M {
+ var x;
+ M(this.x);
+}
+
+fakeAliasing(arr) {
+ var a = new M(10);
+ var b = new M(10);
+ var c = arr.length;
+
+ if (c * c != c * c) {
+ arr[0] = a; // Escape.
+ arr[0] = b;
+ }
+
+ return c * c; // Deopt point.
+}
+
main() {
final fixed = new List(10);
final growable = [];
@@ -99,9 +117,14 @@ main() {
u32List[0] = 0;
u32List[1] = 0x3FFFFFFF;
u32List[2] = 0x7FFFFFFF;
-
+
for (var i = 0; i < 4000; i++) {
testPhiConvertions(true, u32List);
testPhiConvertions(false, u32List);
}
+
+ final escape = new List(1);
+ for (var i = 0; i < 10000; i++) {
+ fakeAliasing(escape);
+ }
}
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698