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

Side by Side Diff: runtime/vm/flow_graph_optimizer.cc

Issue 184273005: VM: Fix bug in aliasing computation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/language/vm/load_to_load_forwarding_vm_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/flow_graph_optimizer.h" 5 #include "vm/flow_graph_optimizer.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/cha.h" 8 #include "vm/cha.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 5400 matching lines...) Expand 10 before | Expand all | Expand 10 after
5411 static bool CanBeAliased(AllocateObjectInstr* alloc) { 5411 static bool CanBeAliased(AllocateObjectInstr* alloc) {
5412 if (alloc->identity() == AllocateObjectInstr::kUnknown) { 5412 if (alloc->identity() == AllocateObjectInstr::kUnknown) {
5413 bool escapes = false; 5413 bool escapes = false;
5414 for (Value* use = alloc->input_use_list(); 5414 for (Value* use = alloc->input_use_list();
5415 use != NULL; 5415 use != NULL;
5416 use = use->next_use()) { 5416 use = use->next_use()) {
5417 Instruction* instr = use->instruction(); 5417 Instruction* instr = use->instruction();
5418 if (instr->IsPushArgument() || 5418 if (instr->IsPushArgument() ||
5419 (instr->IsStoreInstanceField() 5419 (instr->IsStoreInstanceField()
5420 && (use->use_index() != StoreInstanceFieldInstr::kInstancePos)) || 5420 && (use->use_index() != StoreInstanceFieldInstr::kInstancePos)) ||
5421 (instr->IsStoreIndexed()
5422 && (use->use_index() == StoreIndexedInstr::kValuePos)) ||
5421 instr->IsStoreStaticField() || 5423 instr->IsStoreStaticField() ||
5422 instr->IsPhi() || 5424 instr->IsPhi() ||
5423 instr->IsAssertAssignable() || 5425 instr->IsAssertAssignable() ||
5424 instr->IsRedefinition()) { 5426 instr->IsRedefinition()) {
5425 escapes = true; 5427 escapes = true;
5426 break; 5428 break;
5427 } 5429 }
5428 } 5430 }
5429 5431
5430 alloc->set_identity(escapes ? AllocateObjectInstr::kAliased 5432 alloc->set_identity(escapes ? AllocateObjectInstr::kAliased
(...skipping 3229 matching lines...) Expand 10 before | Expand all | Expand 10 after
8660 } 8662 }
8661 8663
8662 // Insert materializations at environment uses. 8664 // Insert materializations at environment uses.
8663 for (intptr_t i = 0; i < exits.length(); i++) { 8665 for (intptr_t i = 0; i < exits.length(); i++) {
8664 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); 8666 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields);
8665 } 8667 }
8666 } 8668 }
8667 8669
8668 8670
8669 } // namespace dart 8671 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | tests/language/vm/load_to_load_forwarding_vm_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698