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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 1662153002: VM: Support fast calls to atan and atan2 in optimized code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comments Created 4 years, 10 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_optimizer.cc ('k') | runtime/vm/method_recognizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 9aa7cd5d10e11a570dc91fc0a9d07ec9f3fca82d..ba426c8594450daaf4584da1ad841e63fc96bc0f 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -3543,9 +3543,11 @@ intptr_t InvokeMathCFunctionInstr::ArgumentCountFor(
return 1;
}
case MethodRecognizer::kDoubleRound:
+ case MethodRecognizer::kMathAtan:
return 1;
case MethodRecognizer::kDoubleMod:
case MethodRecognizer::kMathDoublePow:
+ case MethodRecognizer::kMathAtan2:
return 2;
default:
UNREACHABLE();
@@ -3565,6 +3567,10 @@ DEFINE_RAW_LEAF_RUNTIME_ENTRY(DartModulo, 2, true /* is_float */,
reinterpret_cast<RuntimeFunction>(
static_cast<BinaryMathCFunction>(&DartModulo)));
+DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcAtan2, 2, true /* is_float */,
+ reinterpret_cast<RuntimeFunction>(
+ static_cast<BinaryMathCFunction>(&atan2_ieee)));
+
DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcFloor, 1, true /* is_float */,
reinterpret_cast<RuntimeFunction>(
static_cast<UnaryMathCFunction>(&floor)));
@@ -3596,6 +3602,10 @@ const RuntimeEntry& InvokeMathCFunctionInstr::TargetFunction() const {
return kLibcPowRuntimeEntry;
case MethodRecognizer::kDoubleMod:
return kDartModuloRuntimeEntry;
+ case MethodRecognizer::kMathAtan:
+ return kLibcAtanRuntimeEntry;
+ case MethodRecognizer::kMathAtan2:
+ return kLibcAtan2RuntimeEntry;
default:
UNREACHABLE();
}
@@ -3611,6 +3621,9 @@ DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcSin, 1, true /* is_float */,
reinterpret_cast<RuntimeFunction>(
static_cast<UnaryMathCFunction>(&sin)));
+DEFINE_RAW_LEAF_RUNTIME_ENTRY(LibcAtan, 1, true /* is_float */,
+ reinterpret_cast<RuntimeFunction>(
+ static_cast<UnaryMathCFunction>(&atan)));
const RuntimeEntry& MathUnaryInstr::TargetFunction() const {
switch (kind()) {
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/method_recognizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698