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

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

Issue 25509007: Support unboxed SIMD types in AllocationSinking (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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/allocation_sinking_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/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flow_graph_builder.h" 10 #include "vm/flow_graph_builder.h"
(...skipping 8178 matching lines...) Expand 10 before | Expand all | Expand 10 after
8189 } 8189 }
8190 8190
8191 // Process materializations and unbox their arguments: materializations 8191 // Process materializations and unbox their arguments: materializations
8192 // are part of the environment and can materialize boxes for double/mint/simd 8192 // are part of the environment and can materialize boxes for double/mint/simd
8193 // values when needed. 8193 // values when needed.
8194 // TODO(vegorov): handle all box types here. 8194 // TODO(vegorov): handle all box types here.
8195 for (intptr_t i = 0; i < materializations_.length(); i++) { 8195 for (intptr_t i = 0; i < materializations_.length(); i++) {
8196 MaterializeObjectInstr* mat = materializations_[i]; 8196 MaterializeObjectInstr* mat = materializations_[i];
8197 for (intptr_t j = 0; j < mat->InputCount(); j++) { 8197 for (intptr_t j = 0; j < mat->InputCount(); j++) {
8198 Definition* defn = mat->InputAt(j)->definition(); 8198 Definition* defn = mat->InputAt(j)->definition();
8199 if (defn->IsBoxDouble()) { 8199 if (defn->IsBoxDouble() ||
8200 defn->IsBoxFloat32x4() ||
8201 defn->IsBoxInt32x4()) {
8200 mat->InputAt(j)->BindTo(defn->InputAt(0)->definition()); 8202 mat->InputAt(j)->BindTo(defn->InputAt(0)->definition());
8201 } 8203 }
8202 } 8204 }
8203 } 8205 }
8204 } 8206 }
8205 8207
8206 8208
8207 // Remove materializations from the graph. Register allocator will treat them 8209 // Remove materializations from the graph. Register allocator will treat them
8208 // as part of the environment not as a real instruction. 8210 // as part of the environment not as a real instruction.
8209 void AllocationSinking::DetachMaterializations() { 8211 void AllocationSinking::DetachMaterializations() {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
8321 } 8323 }
8322 8324
8323 // Insert materializations at environment uses. 8325 // Insert materializations at environment uses.
8324 for (intptr_t i = 0; i < exits.length(); i++) { 8326 for (intptr_t i = 0; i < exits.length(); i++) {
8325 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); 8327 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields);
8326 } 8328 }
8327 } 8329 }
8328 8330
8329 8331
8330 } // namespace dart 8332 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | tests/language/vm/allocation_sinking_vm_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698