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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 22853009: For trigonometric functions call to C-libraries: they are faster than x87 operations (3% on Box2D). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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/flow_graph_optimizer.cc
===================================================================
--- runtime/vm/flow_graph_optimizer.cc (revision 27253)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -1732,8 +1732,8 @@
void FlowGraphOptimizer::ReplaceWithMathCFunction(
- InstanceCallInstr* call,
- MethodRecognizer::Kind recognized_kind) {
+ InstanceCallInstr* call,
+ MethodRecognizer::Kind recognized_kind) {
AddReceiverCheck(call);
ZoneGrowableArray<Value*>* args =
new ZoneGrowableArray<Value*>(call->ArgumentCount());
@@ -2735,14 +2735,11 @@
if ((recognized_kind == MethodRecognizer::kMathSqrt) ||
(recognized_kind == MethodRecognizer::kMathSin) ||
(recognized_kind == MethodRecognizer::kMathCos)) {
- if ((recognized_kind == MethodRecognizer::kMathSqrt) ||
- FlowGraphCompiler::SupportsInlinedTrigonometrics()) {
- MathUnaryInstr* math_unary =
- new MathUnaryInstr(recognized_kind,
- new Value(call->ArgumentAt(0)),
- call->deopt_id());
- ReplaceCall(call, math_unary);
- }
+ MathUnaryInstr* math_unary =
+ new MathUnaryInstr(recognized_kind,
+ new Value(call->ArgumentAt(0)),
+ call->deopt_id());
+ ReplaceCall(call, math_unary);
} else if ((recognized_kind == MethodRecognizer::kFloat32x4Zero) ||
(recognized_kind == MethodRecognizer::kFloat32x4Splat) ||
(recognized_kind == MethodRecognizer::kFloat32x4Constructor)) {

Powered by Google App Engine
This is Rietveld 408576698