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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 11198072: Inline load and store index on Float32Arrays. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Final patch Created 8 years, 2 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_compiler_x64.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
index 231443e13be73b009ff6eb2fae4548fe928be876..27d1d8ff7120f852878aa63343ec1455ef33c2cf 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -497,6 +497,7 @@ bool FlowGraphOptimizer::TryReplaceWithStoreIndexed(InstanceCallInstr* call) {
case kGrowableObjectArrayCid:
// Acceptable store index classes.
break;
+ case kFloat32ArrayCid:
case kFloat64ArrayCid: {
// Check that value is always double.
value_check = call->ic_data()->AsUnaryClassChecksForArgNr(2);
@@ -538,6 +539,7 @@ bool FlowGraphOptimizer::TryReplaceWithStoreIndexed(InstanceCallInstr* call) {
type_args = new Value(load_type_args);
break;
}
+ case kFloat32ArrayCid:
case kFloat64ArrayCid: {
ConstantInstr* null_constant = new ConstantInstr(Object::ZoneHandle());
InsertBefore(call, null_constant, NULL, Definition::kValue);
@@ -567,7 +569,7 @@ bool FlowGraphOptimizer::TryReplaceWithStoreIndexed(InstanceCallInstr* call) {
Value* value = call->ArgumentAt(2)->value();
// Check if store barrier is needed.
bool needs_store_barrier = true;
- if (class_id == kFloat64ArrayCid) {
+ if ((class_id == kFloat32ArrayCid) || (class_id == kFloat64ArrayCid)) {
ASSERT(!value_check.IsNull());
InsertBefore(call,
new CheckClassInstr(value->Copy(),
@@ -600,6 +602,7 @@ bool FlowGraphOptimizer::TryReplaceWithLoadIndexed(InstanceCallInstr* call) {
case kArrayCid:
case kImmutableArrayCid:
case kGrowableObjectArrayCid:
+ case kFloat32ArrayCid:
case kFloat64ArrayCid:
// Acceptable load index classes.
break;
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698