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

Side by Side Diff: runtime/vm/intrinsifier.cc

Issue 1832343003: Intrinsify some double operations, helps in AOT (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | runtime/vm/method_recognizer.h » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // Class for intrinsifying functions. 4 // Class for intrinsifying functions.
5 5
6 #include "vm/assembler.h" 6 #include "vm/assembler.h"
7 #include "vm/compiler.h" 7 #include "vm/compiler.h"
8 #include "vm/flags.h" 8 #include "vm/flags.h"
9 #include "vm/flow_graph.h" 9 #include "vm/flow_graph.h"
10 #include "vm/flow_graph_compiler.h" 10 #include "vm/flow_graph_compiler.h"
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 1061
1062 GraphEntryInstr* graph_entry = flow_graph->graph_entry(); 1062 GraphEntryInstr* graph_entry = flow_graph->graph_entry();
1063 TargetEntryInstr* normal_entry = graph_entry->normal_entry(); 1063 TargetEntryInstr* normal_entry = graph_entry->normal_entry();
1064 BlockBuilder builder(flow_graph, normal_entry); 1064 BlockBuilder builder(flow_graph, normal_entry);
1065 1065
1066 return BuildInvokeMathCFunction(&builder, 1066 return BuildInvokeMathCFunction(&builder,
1067 MethodRecognizer::kMathAtan2, 1067 MethodRecognizer::kMathAtan2,
1068 /* num_parameters = */ 2); 1068 /* num_parameters = */ 2);
1069 } 1069 }
1070 1070
1071
1072 bool Intrinsifier::Build_DoubleMod(FlowGraph* flow_graph) {
1073 if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
1074
1075 GraphEntryInstr* graph_entry = flow_graph->graph_entry();
1076 TargetEntryInstr* normal_entry = graph_entry->normal_entry();
1077 BlockBuilder builder(flow_graph, normal_entry);
1078
1079 return BuildInvokeMathCFunction(&builder,
1080 MethodRecognizer::kDoubleMod,
1081 /* num_parameters = */ 2);
1082 }
1083
1084
1085 bool Intrinsifier::Build_DoubleCeil(FlowGraph* flow_graph) {
1086 if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
1087
1088 GraphEntryInstr* graph_entry = flow_graph->graph_entry();
1089 TargetEntryInstr* normal_entry = graph_entry->normal_entry();
1090 BlockBuilder builder(flow_graph, normal_entry);
1091
1092 return BuildInvokeMathCFunction(&builder,
1093 MethodRecognizer::kDoubleCeil);
1094 }
1095
1096
1097 bool Intrinsifier::Build_DoubleFloor(FlowGraph* flow_graph) {
1098 if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
1099
1100 GraphEntryInstr* graph_entry = flow_graph->graph_entry();
1101 TargetEntryInstr* normal_entry = graph_entry->normal_entry();
1102 BlockBuilder builder(flow_graph, normal_entry);
1103
1104 return BuildInvokeMathCFunction(&builder,
1105 MethodRecognizer::kDoubleFloor);
1106 }
1107
1108
1109 bool Intrinsifier::Build_DoubleTruncate(FlowGraph* flow_graph) {
1110 if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
1111
1112 GraphEntryInstr* graph_entry = flow_graph->graph_entry();
1113 TargetEntryInstr* normal_entry = graph_entry->normal_entry();
1114 BlockBuilder builder(flow_graph, normal_entry);
1115
1116 return BuildInvokeMathCFunction(&builder,
1117 MethodRecognizer::kDoubleTruncate);
1118 }
1119
1120
1121 bool Intrinsifier::Build_DoubleRound(FlowGraph* flow_graph) {
1122 if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
1123
1124 GraphEntryInstr* graph_entry = flow_graph->graph_entry();
1125 TargetEntryInstr* normal_entry = graph_entry->normal_entry();
1126 BlockBuilder builder(flow_graph, normal_entry);
1127
1128 return BuildInvokeMathCFunction(&builder,
1129 MethodRecognizer::kDoubleRound);
1130 }
1131
1071 } // namespace dart 1132 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/method_recognizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698