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

Unified Diff: runtime/vm/intermediate_language.h

Issue 22266005: Inline fsin/fcos. Huge speedup on Box2D. (Closed) Base URL: http://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 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
===================================================================
--- runtime/vm/intermediate_language.h (revision 25815)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -80,6 +80,8 @@
V(_Double, pow, DoublePow, 102305574) \
V(_Double, _modulo, DoubleMod, 663439671) \
V(::, sqrt, MathSqrt, 1662640002) \
+ V(::, sin, MathSin, 1273932041) \
+ V(::, cos, MathCos, 1749547468) \
V(::, min, MathMin, 269896129) \
V(::, max, MathMax, 1286442186) \
V(Float32x4, Float32x4., Float32x4Constructor, 1492157358) \
@@ -588,7 +590,7 @@
M(Constant) \
M(CheckEitherNonSmi) \
M(BinaryDoubleOp) \
- M(MathSqrt) \
+ M(MathUnary) \
M(MathMinMax) \
M(UnboxDouble) \
M(BoxDouble) \
@@ -919,7 +921,7 @@
friend class UnarySmiOpInstr;
friend class ShiftMintOpInstr;
friend class UnaryMintOpInstr;
- friend class MathSqrtInstr;
+ friend class MathUnaryInstr;
friend class MathMinMaxInstr;
friend class CheckClassInstr;
friend class GuardFieldInstr;
@@ -4607,15 +4609,18 @@
};
-class MathSqrtInstr : public TemplateDefinition<1> {
+class MathUnaryInstr : public TemplateDefinition<1> {
public:
- MathSqrtInstr(Value* value, intptr_t deopt_id) {
+ MathUnaryInstr(MethodRecognizer::Kind kind, Value* value, intptr_t deopt_id)
+ : kind_(kind) {
SetInputAt(0, value);
deopt_id_ = deopt_id;
}
Value* value() const { return inputs_[0]; }
+ MethodRecognizer::Kind kind() const { return kind_; }
+
virtual bool CanDeoptimize() const { return false; }
virtual Representation representation() const {
@@ -4633,7 +4638,7 @@
return deopt_id_;
}
- DECLARE_INSTRUCTION(MathSqrt)
+ DECLARE_INSTRUCTION(MathUnary)
virtual CompileType ComputeType() const;
virtual bool AllowsCSE() const { return true; }
@@ -4644,7 +4649,9 @@
virtual bool MayThrow() const { return false; }
private:
- DISALLOW_COPY_AND_ASSIGN(MathSqrtInstr);
+ const MethodRecognizer::Kind kind_;
+
+ DISALLOW_COPY_AND_ASSIGN(MathUnaryInstr);
};
« 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