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

Unified Diff: runtime/vm/intermediate_language.h

Issue 13867006: Inline binary Float32x4 ops. (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
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index fd21acff8147005f9ad2dd8b61fbad05ab90bc12..93d9d1c902e1e905f6190dabf74874c5ce888f15 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -504,6 +504,7 @@ class EmbeddedArray<T, 0> {
M(InvokeMathCFunction) \
M(GuardField) \
M(IfThenElse) \
+ M(BinaryFloat32x4Op) \
#define FORWARD_DECLARATION(type) class type##Instr;
FOR_EACH_INSTRUCTION(FORWARD_DECLARATION)
@@ -758,6 +759,7 @@ FOR_EACH_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
friend class UnboxDoubleInstr;
friend class UnboxFloat32x4Instr;
friend class BinaryDoubleOpInstr;
+ friend class BinaryFloat32x4OpInstr;
friend class BinaryMintOpInstr;
friend class BinarySmiOpInstr;
friend class UnarySmiOpInstr;
@@ -4081,6 +4083,62 @@ class BinaryDoubleOpInstr : public TemplateDefinition<2> {
};
+class BinaryFloat32x4OpInstr : public TemplateDefinition<2> {
+ public:
+ BinaryFloat32x4OpInstr(Token::Kind op_kind,
+ Value* left,
+ Value* right,
+ InstanceCallInstr* instance_call)
+ : op_kind_(op_kind) {
+ SetInputAt(0, left);
+ SetInputAt(1, right);
+ deopt_id_ = instance_call->deopt_id();
+ }
+
+ Value* left() const { return inputs_[0]; }
+ Value* right() const { return inputs_[1]; }
+
+ Token::Kind op_kind() const { return op_kind_; }
+
+ virtual void PrintOperandsTo(BufferFormatter* f) const;
+
+ 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 op_kind() == other->AsBinaryFloat32x4Op()->op_kind();
+ }
+
+ virtual Representation representation() const {
+ return kUnboxedFloat32x4;
+ }
+
+ virtual Representation RequiredInputRepresentation(intptr_t idx) const {
+ ASSERT((idx == 0) || (idx == 1));
+ return kUnboxedFloat32x4;
+ }
+
+ virtual intptr_t DeoptimizationTarget() const {
+ // Direct access since this instruction cannot deoptimize, and the deopt-id
+ // was inherited from another instruction that could deoptimize.
+ return deopt_id_;
+ }
+
+ DECLARE_INSTRUCTION(BinaryFloat32x4Op)
+ virtual CompileType ComputeType() const;
+
+ virtual Definition* Canonicalize(FlowGraphOptimizer* optimizer);
+
+ private:
+ const Token::Kind op_kind_;
+
+ DISALLOW_COPY_AND_ASSIGN(BinaryFloat32x4OpInstr);
+};
+
+
class BinaryMintOpInstr : public TemplateDefinition<2> {
public:
BinaryMintOpInstr(Token::Kind op_kind,

Powered by Google App Engine
This is Rietveld 408576698