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

Unified Diff: runtime/vm/intermediate_language.h

Issue 2433813002: Reland "Add DoubleTestOp instruction" (Closed)
Patch Set: Created 4 years, 2 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/il_printer.cc ('k') | runtime/vm/intermediate_language.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 1fe4377941f990987729271f0acee23ef76ad06c..2876be7d7284602898e920d5549574ca2d4b03d5 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -497,6 +497,7 @@ class EmbeddedArray<T, 0> {
M(UnboxedConstant) \
M(CheckEitherNonSmi) \
M(BinaryDoubleOp) \
+ M(DoubleTestOp) \
M(MathUnary) \
M(MathMinMax) \
M(Box) \
@@ -5343,6 +5344,56 @@ class BinaryDoubleOpInstr : public TemplateDefinition<2, NoThrow, Pure> {
};
+class DoubleTestOpInstr : public TemplateDefinition<1, NoThrow, Pure> {
+ public:
+ DoubleTestOpInstr(MethodRecognizer::Kind op_kind,
+ Value* d,
+ intptr_t deopt_id,
+ TokenPosition token_pos)
+ : TemplateDefinition(deopt_id),
+ op_kind_(op_kind),
+ token_pos_(token_pos) {
+ SetInputAt(0, d);
+ }
+
+ Value* value() const { return inputs_[0]; }
+
+ MethodRecognizer::Kind op_kind() const { return op_kind_; }
+
+ virtual TokenPosition token_pos() const { return token_pos_; }
+
+ virtual bool CanDeoptimize() const { return false; }
+
+ virtual Representation RequiredInputRepresentation(intptr_t idx) const {
+ ASSERT(idx == 0);
+ return kUnboxedDouble;
+ }
+
+ 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 GetDeoptId();
+ }
+
+ PRINT_OPERANDS_TO_SUPPORT
+
+ DECLARE_INSTRUCTION(DoubleTestOp)
+ virtual CompileType ComputeType() const;
+
+ virtual Definition* Canonicalize(FlowGraph* flow_graph);
+
+ virtual bool AttributesEqual(Instruction* other) const {
+ return op_kind_ == other->AsDoubleTestOp()->op_kind();
+ }
+
+ private:
+ const MethodRecognizer::Kind op_kind_;
+ const TokenPosition token_pos_;
+
+ DISALLOW_COPY_AND_ASSIGN(DoubleTestOpInstr);
+};
+
+
class BinaryFloat32x4OpInstr : public TemplateDefinition<2, NoThrow, Pure> {
public:
BinaryFloat32x4OpInstr(Token::Kind op_kind,
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698