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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 172653002: Unbox/Box Float64x2 and inline typed array loads and stores (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/intermediate_language.h ('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 9bb766e57532a2c95b4e8239f89c19dabe67ee65..da607d3fe2680fa8a077f719e0b2c4fd505e46d0 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -1572,6 +1572,30 @@ Definition* UnboxFloat32x4Instr::Canonicalize(FlowGraph* flow_graph) {
}
+Definition* BoxFloat64x2Instr::Canonicalize(FlowGraph* flow_graph) {
+ if (input_use_list() == NULL) {
+ // Environments can accomodate any representation. No need to box.
+ return value()->definition();
+ }
+
+ // Fold away BoxFloat64x2(UnboxFloat64x2(v)).
+ UnboxFloat64x2Instr* defn = value()->definition()->AsUnboxFloat64x2();
+ if ((defn != NULL) && (defn->value()->Type()->ToCid() == kFloat64x2Cid)) {
+ return defn->value()->definition();
+ }
+
+ return this;
+}
+
+
+Definition* UnboxFloat64x2Instr::Canonicalize(FlowGraph* flow_graph) {
+ // Fold away UnboxFloat64x2(BoxFloat64x2(v)).
+ BoxFloat64x2Instr* defn = value()->definition()->AsBoxFloat64x2();
+ return (defn != NULL) ? defn->value()->definition() : this;
+}
+
+
+
Definition* BoxInt32x4Instr::Canonicalize(FlowGraph* flow_graph) {
if (input_use_list() == NULL) {
// Environments can accomodate any representation. No need to box.
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698