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

Unified Diff: runtime/vm/intermediate_language.h

Issue 13818006: Unboxed load/store indexed of Float32x4 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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_type_propagator.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.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 8184f649fc719fa7dd609a3872782ff4abe51e05..50e8052869a9a6cc05eea1573d2307086983e049 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -46,6 +46,7 @@ class Range;
V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 380843687) \
V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 979971573) \
V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 979971573) \
+ V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 690339584) \
V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 287047804) \
V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 287047804) \
V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 287047804) \
@@ -54,6 +55,7 @@ class Range;
V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 287047804) \
V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 1032541114) \
V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 1032541114) \
+ V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 1016704782) \
V(_GrowableObjectArray, get:length, GrowableArrayLength, 725548050) \
V(_GrowableObjectArray, get:_capacity, GrowableArrayCapacity, 725548050) \
V(_StringBase, get:length, StringBaseLength, 320803993) \
@@ -489,6 +491,8 @@ class EmbeddedArray<T, 0> {
M(MathSqrt) \
M(UnboxDouble) \
M(BoxDouble) \
+ M(BoxFloat32x4) \
+ M(UnboxFloat32x4) \
M(UnboxInteger) \
M(BoxInteger) \
M(BinaryMintOp) \
@@ -740,6 +744,7 @@ FOR_EACH_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
// Classes that set deopt_id_.
friend class UnboxIntegerInstr;
friend class UnboxDoubleInstr;
+ friend class UnboxFloat32x4Instr;
friend class BinaryDoubleOpInstr;
friend class BinaryMintOpInstr;
friend class BinarySmiOpInstr;
@@ -3738,15 +3743,12 @@ class CheckEitherNonSmiInstr : public TemplateInstruction<2> {
class BoxDoubleInstr : public TemplateDefinition<1> {
public:
- BoxDoubleInstr(Value* value, InstanceCallInstr* instance_call)
- : token_pos_((instance_call != NULL) ? instance_call->token_pos() : 0) {
+ explicit BoxDoubleInstr(Value* value) {
SetInputAt(0, value);
}
Value* value() const { return inputs_[0]; }
- intptr_t token_pos() const { return token_pos_; }
-
virtual bool CanDeoptimize() const { return false; }
virtual bool HasSideEffect() const { return false; }
@@ -3763,12 +3765,38 @@ class BoxDoubleInstr : public TemplateDefinition<1> {
virtual CompileType ComputeType() const;
private:
- const intptr_t token_pos_;
-
DISALLOW_COPY_AND_ASSIGN(BoxDoubleInstr);
};
+class BoxFloat32x4Instr : public TemplateDefinition<1> {
+ public:
+ explicit BoxFloat32x4Instr(Value* value) {
+ SetInputAt(0, value);
+ }
+
+ Value* value() const { return inputs_[0]; }
+
+ virtual bool CanDeoptimize() const { return false; }
+
+ virtual bool HasSideEffect() const { return false; }
+
+ virtual bool AffectedBySideEffect() const { return false; }
+ virtual bool AttributesEqual(Instruction* other) const { return true; }
+
+ virtual Representation RequiredInputRepresentation(intptr_t idx) const {
+ ASSERT(idx == 0);
+ return kUnboxedFloat32x4;
+ }
+
+ DECLARE_INSTRUCTION(BoxFloat32x4)
+ virtual CompileType ComputeType() const;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(BoxFloat32x4Instr);
+};
+
+
class BoxIntegerInstr : public TemplateDefinition<1> {
public:
explicit BoxIntegerInstr(Value* value) {
@@ -3828,6 +3856,36 @@ class UnboxDoubleInstr : public TemplateDefinition<1> {
};
+class UnboxFloat32x4Instr : public TemplateDefinition<1> {
+ public:
+ UnboxFloat32x4Instr(Value* value, intptr_t deopt_id) {
+ SetInputAt(0, value);
+ deopt_id_ = deopt_id;
+ }
+
+ Value* value() const { return inputs_[0]; }
+
+ virtual bool CanDeoptimize() const {
+ return (value()->Type()->ToCid() != kFloat32x4Cid);
+ }
+
+ virtual bool HasSideEffect() const { return false; }
+
+ virtual Representation representation() const {
+ return kUnboxedFloat32x4;
+ }
+
+ virtual bool AffectedBySideEffect() const { return false; }
+ virtual bool AttributesEqual(Instruction* other) const { return true; }
+
+ DECLARE_INSTRUCTION(UnboxFloat32x4)
+ virtual CompileType ComputeType() const;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UnboxFloat32x4Instr);
+};
+
+
class UnboxIntegerInstr : public TemplateDefinition<1> {
public:
UnboxIntegerInstr(Value* value, intptr_t deopt_id) {
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698