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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 150063004: Support reusable boxes for Float32x4 fields (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index a4bd4f9f27c82cfbff20d6109b1c7dcafcddf19b..82999d183a3f3f2ed30b9b45a602e15131df87ec 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -26,7 +26,8 @@ namespace dart {
DEFINE_FLAG(bool, propagate_ic_data, true,
"Propagate IC data from unoptimized to optimized IC calls.");
-DEFINE_FLAG(bool, unbox_double_fields, true, "Support unboxed double fields.");
+DEFINE_FLAG(bool, unbox_numeric_fields, true,
+ "Support unboxed double and float32x4 fields.");
DECLARE_FLAG(bool, enable_type_checks);
DECLARE_FLAG(bool, eliminate_type_checks);
DECLARE_FLAG(bool, trace_optimization);
@@ -138,14 +139,14 @@ bool CheckClassInstr::IsNullCheck() const {
bool LoadFieldInstr::IsUnboxedLoad() const {
- return FLAG_unbox_double_fields
+ return FLAG_unbox_numeric_fields
&& (field() != NULL)
&& field()->IsUnboxedField();
}
bool LoadFieldInstr::IsPotentialUnboxedLoad() const {
- return FLAG_unbox_double_fields
+ return FLAG_unbox_numeric_fields
&& (field() != NULL)
&& field()->IsPotentialUnboxedField();
}
@@ -157,7 +158,8 @@ Representation LoadFieldInstr::representation() const {
switch (cid) {
case kDoubleCid:
return kUnboxedDouble;
- // TODO(johnmccutchan): Add kFloat32x4Cid here.
+ case kFloat32x4Cid:
+ return kUnboxedFloat32x4;
default:
UNREACHABLE();
}
@@ -167,12 +169,12 @@ Representation LoadFieldInstr::representation() const {
bool StoreInstanceFieldInstr::IsUnboxedStore() const {
- return FLAG_unbox_double_fields && field().IsUnboxedField();
+ return FLAG_unbox_numeric_fields && field().IsUnboxedField();
}
bool StoreInstanceFieldInstr::IsPotentialUnboxedStore() const {
- return FLAG_unbox_double_fields && field().IsPotentialUnboxedField();
+ return FLAG_unbox_numeric_fields && field().IsPotentialUnboxedField();
}
@@ -184,6 +186,8 @@ Representation StoreInstanceFieldInstr::RequiredInputRepresentation(
switch (cid) {
case kDoubleCid:
return kUnboxedDouble;
+ case kFloat32x4Cid:
+ return kUnboxedFloat32x4;
default:
UNREACHABLE();
}
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698