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

Side by Side Diff: runtime/vm/intermediate_language.h

Issue 22947006: Add signMask getter to Float32x4 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 V(::, min, MathMin, 1584022354) \ 87 V(::, min, MathMin, 1584022354) \
88 V(::, max, MathMax, 328632232) \ 88 V(::, max, MathMax, 328632232) \
89 V(Float32x4, Float32x4., Float32x4Constructor, 1876089990) \ 89 V(Float32x4, Float32x4., Float32x4Constructor, 1876089990) \
90 V(Float32x4, Float32x4.zero, Float32x4Zero, 1903586222) \ 90 V(Float32x4, Float32x4.zero, Float32x4Zero, 1903586222) \
91 V(Float32x4, Float32x4.splat, Float32x4Splat, 38462589) \ 91 V(Float32x4, Float32x4.splat, Float32x4Splat, 38462589) \
92 V(_Float32x4, shuffle, Float32x4Shuffle, 713523911) \ 92 V(_Float32x4, shuffle, Float32x4Shuffle, 713523911) \
93 V(_Float32x4, get:x, Float32x4ShuffleX, 1019523296) \ 93 V(_Float32x4, get:x, Float32x4ShuffleX, 1019523296) \
94 V(_Float32x4, get:y, Float32x4ShuffleY, 710282243) \ 94 V(_Float32x4, get:y, Float32x4ShuffleY, 710282243) \
95 V(_Float32x4, get:z, Float32x4ShuffleZ, 1612806041) \ 95 V(_Float32x4, get:z, Float32x4ShuffleZ, 1612806041) \
96 V(_Float32x4, get:w, Float32x4ShuffleW, 1113701403) \ 96 V(_Float32x4, get:w, Float32x4ShuffleW, 1113701403) \
97 V(_Float32x4, get:signMask, Float32x4GetSignMask, 465347632) \
97 V(_Float32x4, _cmpequal, Float32x4Equal, 1559121703) \ 98 V(_Float32x4, _cmpequal, Float32x4Equal, 1559121703) \
98 V(_Float32x4, _cmpgt, Float32x4GreaterThan, 1959692892) \ 99 V(_Float32x4, _cmpgt, Float32x4GreaterThan, 1959692892) \
99 V(_Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, 2128251808) \ 100 V(_Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, 2128251808) \
100 V(_Float32x4, _cmplt, Float32x4LessThan, 405464198) \ 101 V(_Float32x4, _cmplt, Float32x4LessThan, 405464198) \
101 V(_Float32x4, _cmplte, Float32x4LessThanOrEqual, 1217836152) \ 102 V(_Float32x4, _cmplte, Float32x4LessThanOrEqual, 1217836152) \
102 V(_Float32x4, _cmpnequal, Float32x4NotEqual, 498820440) \ 103 V(_Float32x4, _cmpnequal, Float32x4NotEqual, 498820440) \
103 V(_Float32x4, _min, Float32x4Min, 1354880316) \ 104 V(_Float32x4, _min, Float32x4Min, 1354880316) \
104 V(_Float32x4, _max, Float32x4Max, 171574145) \ 105 V(_Float32x4, _max, Float32x4Max, 171574145) \
105 V(_Float32x4, _scale, Float32x4Scale, 1553559438) \ 106 V(_Float32x4, _scale, Float32x4Scale, 1553559438) \
106 V(_Float32x4, _sqrt, Float32x4Sqrt, 612006112) \ 107 V(_Float32x4, _sqrt, Float32x4Sqrt, 612006112) \
(...skipping 10 matching lines...) Expand all
117 V(_Float32x4, withZWInXY, Float32x4WithZWInXY, 1850941421) \ 118 V(_Float32x4, withZWInXY, Float32x4WithZWInXY, 1850941421) \
118 V(_Float32x4, interleaveXY, Float32x4InterleaveXY, 1789523505) \ 119 V(_Float32x4, interleaveXY, Float32x4InterleaveXY, 1789523505) \
119 V(_Float32x4, interleaveZW, Float32x4InterleaveZW, 1137302773) \ 120 V(_Float32x4, interleaveZW, Float32x4InterleaveZW, 1137302773) \
120 V(_Float32x4, interleaveXYPairs, Float32x4InterleaveXYPairs, 2138669236) \ 121 V(_Float32x4, interleaveXYPairs, Float32x4InterleaveXYPairs, 2138669236) \
121 V(_Float32x4, interleaveZWPairs, Float32x4InterleaveZWPairs, 1541966446) \ 122 V(_Float32x4, interleaveZWPairs, Float32x4InterleaveZWPairs, 1541966446) \
122 V(Uint32x4, Uint32x4.bool, Uint32x4BoolConstructor, 733327933) \ 123 V(Uint32x4, Uint32x4.bool, Uint32x4BoolConstructor, 733327933) \
123 V(_Uint32x4, get:flagX, Uint32x4GetFlagX, 765894409) \ 124 V(_Uint32x4, get:flagX, Uint32x4GetFlagX, 765894409) \
124 V(_Uint32x4, get:flagY, Uint32x4GetFlagY, 1226233321) \ 125 V(_Uint32x4, get:flagY, Uint32x4GetFlagY, 1226233321) \
125 V(_Uint32x4, get:flagZ, Uint32x4GetFlagZ, 1455452476) \ 126 V(_Uint32x4, get:flagZ, Uint32x4GetFlagZ, 1455452476) \
126 V(_Uint32x4, get:flagW, Uint32x4GetFlagW, 1608549245) \ 127 V(_Uint32x4, get:flagW, Uint32x4GetFlagW, 1608549245) \
128 V(_Uint32x4, get:signMask, Uint32x4GetSignMask, 231202664) \
127 V(_Uint32x4, select, Uint32x4Select, 881590808) \ 129 V(_Uint32x4, select, Uint32x4Select, 881590808) \
128 V(_Uint32x4, withFlagX, Uint32x4WithFlagX, 1987921054) \ 130 V(_Uint32x4, withFlagX, Uint32x4WithFlagX, 1987921054) \
129 V(_Uint32x4, withFlagY, Uint32x4WithFlagY, 831632614) \ 131 V(_Uint32x4, withFlagY, Uint32x4WithFlagY, 831632614) \
130 V(_Uint32x4, withFlagZ, Uint32x4WithFlagZ, 465765612) \ 132 V(_Uint32x4, withFlagZ, Uint32x4WithFlagZ, 465765612) \
131 V(_Uint32x4, withFlagW, Uint32x4WithFlagW, 1545009993) \ 133 V(_Uint32x4, withFlagW, Uint32x4WithFlagW, 1545009993) \
132 V(_Uint32x4, _toFloat32x4, Uint32x4ToUint32x4, 1545735523) \ 134 V(_Uint32x4, _toFloat32x4, Uint32x4ToUint32x4, 1545735523) \
133 135
134 136
135 // A list of core function that should always be inlined. 137 // A list of core function that should always be inlined.
136 #define INLINE_WHITE_LIST(V) \ 138 #define INLINE_WHITE_LIST(V) \
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 M(ShiftMintOp) \ 608 M(ShiftMintOp) \
607 M(UnaryMintOp) \ 609 M(UnaryMintOp) \
608 M(CheckArrayBound) \ 610 M(CheckArrayBound) \
609 M(Constraint) \ 611 M(Constraint) \
610 M(StringFromCharCode) \ 612 M(StringFromCharCode) \
611 M(InvokeMathCFunction) \ 613 M(InvokeMathCFunction) \
612 M(GuardField) \ 614 M(GuardField) \
613 M(IfThenElse) \ 615 M(IfThenElse) \
614 M(BinaryFloat32x4Op) \ 616 M(BinaryFloat32x4Op) \
615 M(Float32x4Shuffle) \ 617 M(Float32x4Shuffle) \
618 M(Simd32x4GetSignMask) \
616 M(Float32x4Constructor) \ 619 M(Float32x4Constructor) \
617 M(Float32x4Zero) \ 620 M(Float32x4Zero) \
618 M(Float32x4Splat) \ 621 M(Float32x4Splat) \
619 M(Float32x4Comparison) \ 622 M(Float32x4Comparison) \
620 M(Float32x4MinMax) \ 623 M(Float32x4MinMax) \
621 M(Float32x4Scale) \ 624 M(Float32x4Scale) \
622 M(Float32x4Sqrt) \ 625 M(Float32x4Sqrt) \
623 M(Float32x4ZeroArg) \ 626 M(Float32x4ZeroArg) \
624 M(Float32x4Clamp) \ 627 M(Float32x4Clamp) \
625 M(Float32x4With) \ 628 M(Float32x4With) \
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 // Classes that set or read deopt_id_. 898 // Classes that set or read deopt_id_.
896 friend class UnboxIntegerInstr; 899 friend class UnboxIntegerInstr;
897 friend class UnboxDoubleInstr; 900 friend class UnboxDoubleInstr;
898 friend class UnboxFloat32x4Instr; 901 friend class UnboxFloat32x4Instr;
899 friend class UnboxUint32x4Instr; 902 friend class UnboxUint32x4Instr;
900 friend class BinaryDoubleOpInstr; 903 friend class BinaryDoubleOpInstr;
901 friend class BinaryFloat32x4OpInstr; 904 friend class BinaryFloat32x4OpInstr;
902 friend class Float32x4ZeroInstr; 905 friend class Float32x4ZeroInstr;
903 friend class Float32x4SplatInstr; 906 friend class Float32x4SplatInstr;
904 friend class Float32x4ShuffleInstr; 907 friend class Float32x4ShuffleInstr;
908 friend class Simd32x4GetSignMaskInstr;
905 friend class Float32x4ConstructorInstr; 909 friend class Float32x4ConstructorInstr;
906 friend class Float32x4ComparisonInstr; 910 friend class Float32x4ComparisonInstr;
907 friend class Float32x4MinMaxInstr; 911 friend class Float32x4MinMaxInstr;
908 friend class Float32x4ScaleInstr; 912 friend class Float32x4ScaleInstr;
909 friend class Float32x4SqrtInstr; 913 friend class Float32x4SqrtInstr;
910 friend class Float32x4ZeroArgInstr; 914 friend class Float32x4ZeroArgInstr;
911 friend class Float32x4ClampInstr; 915 friend class Float32x4ClampInstr;
912 friend class Float32x4WithInstr; 916 friend class Float32x4WithInstr;
913 friend class Float32x4ToUint32x4Instr; 917 friend class Float32x4ToUint32x4Instr;
914 friend class Float32x4TwoArgShuffleInstr; 918 friend class Float32x4TwoArgShuffleInstr;
(...skipping 4605 matching lines...) Expand 10 before | Expand all | Expand 10 after
5520 5524
5521 virtual bool MayThrow() const { return false; } 5525 virtual bool MayThrow() const { return false; }
5522 5526
5523 private: 5527 private:
5524 const MethodRecognizer::Kind op_kind_; 5528 const MethodRecognizer::Kind op_kind_;
5525 5529
5526 DISALLOW_COPY_AND_ASSIGN(Uint32x4GetFlagInstr); 5530 DISALLOW_COPY_AND_ASSIGN(Uint32x4GetFlagInstr);
5527 }; 5531 };
5528 5532
5529 5533
5534 class Simd32x4GetSignMaskInstr : public TemplateDefinition<1> {
5535 public:
5536 Simd32x4GetSignMaskInstr(MethodRecognizer::Kind op_kind, Value* value,
5537 intptr_t deopt_id) : op_kind_(op_kind) {
5538 SetInputAt(0, value);
5539 deopt_id_ = deopt_id;
5540 }
5541
5542 Value* value() const { return inputs_[0]; }
5543
5544 MethodRecognizer::Kind op_kind() const { return op_kind_; }
5545
5546 virtual void PrintOperandsTo(BufferFormatter* f) const;
5547
5548 virtual bool CanDeoptimize() const { return false; }
5549
5550 virtual Representation representation() const {
5551 return kTagged;
5552 }
5553
5554 virtual Representation RequiredInputRepresentation(intptr_t idx) const {
5555 ASSERT(idx == 0);
5556 if (op_kind_ == MethodRecognizer::kFloat32x4GetSignMask) {
5557 return kUnboxedFloat32x4;
5558 }
5559 ASSERT(op_kind_ == MethodRecognizer::kUint32x4GetSignMask);
5560 return kUnboxedUint32x4;
5561 }
5562
5563 virtual intptr_t DeoptimizationTarget() const {
5564 // Direct access since this instruction cannot deoptimize, and the deopt-id
5565 // was inherited from another instruction that could deoptimize.
5566 return deopt_id_;
5567 }
5568
5569 DECLARE_INSTRUCTION(Simd32x4GetSignMask)
5570 virtual CompileType ComputeType() const;
5571
5572 virtual bool AllowsCSE() const { return true; }
5573 virtual EffectSet Effects() const { return EffectSet::None(); }
5574 virtual EffectSet Dependencies() const { return EffectSet::None(); }
5575 virtual bool AttributesEqual(Instruction* other) const {
5576 return other->AsSimd32x4GetSignMask()->op_kind() == op_kind();
5577 }
5578
5579 virtual bool MayThrow() const { return false; }
5580
5581 private:
5582 const MethodRecognizer::Kind op_kind_;
5583
5584 DISALLOW_COPY_AND_ASSIGN(Simd32x4GetSignMaskInstr);
5585 };
5586
5587
5530 class Float32x4TwoArgShuffleInstr : public TemplateDefinition<2> { 5588 class Float32x4TwoArgShuffleInstr : public TemplateDefinition<2> {
5531 public: 5589 public:
5532 Float32x4TwoArgShuffleInstr(MethodRecognizer::Kind op_kind, Value* left, 5590 Float32x4TwoArgShuffleInstr(MethodRecognizer::Kind op_kind, Value* left,
5533 Value* right, intptr_t deopt_id) 5591 Value* right, intptr_t deopt_id)
5534 : op_kind_(op_kind) { 5592 : op_kind_(op_kind) {
5535 SetInputAt(0, left); 5593 SetInputAt(0, left);
5536 SetInputAt(1, right); 5594 SetInputAt(1, right);
5537 deopt_id_ = deopt_id; 5595 deopt_id_ = deopt_id;
5538 } 5596 }
5539 5597
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
6675 ForwardInstructionIterator* current_iterator_; 6733 ForwardInstructionIterator* current_iterator_;
6676 6734
6677 private: 6735 private:
6678 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 6736 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
6679 }; 6737 };
6680 6738
6681 6739
6682 } // namespace dart 6740 } // namespace dart
6683 6741
6684 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 6742 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698