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

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/cpu.h"
Florian Schneider 2016/03/28 19:42:54 Why is this include needed?
Cutch 2016/03/28 20:08:45 Removed.
8 #include "vm/flags.h" 9 #include "vm/flags.h"
9 #include "vm/flow_graph.h" 10 #include "vm/flow_graph.h"
10 #include "vm/flow_graph_compiler.h" 11 #include "vm/flow_graph_compiler.h"
11 #include "vm/flow_graph_allocator.h" 12 #include "vm/flow_graph_allocator.h"
12 #include "vm/flow_graph_builder.h" 13 #include "vm/flow_graph_builder.h"
13 #include "vm/il_printer.h" 14 #include "vm/il_printer.h"
14 #include "vm/intermediate_language.h" 15 #include "vm/intermediate_language.h"
15 #include "vm/intrinsifier.h" 16 #include "vm/intrinsifier.h"
16 #include "vm/object.h" 17 #include "vm/object.h"
17 #include "vm/parser.h" 18 #include "vm/parser.h"
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 1062
1062 GraphEntryInstr* graph_entry = flow_graph->graph_entry(); 1063 GraphEntryInstr* graph_entry = flow_graph->graph_entry();
1063 TargetEntryInstr* normal_entry = graph_entry->normal_entry(); 1064 TargetEntryInstr* normal_entry = graph_entry->normal_entry();
1064 BlockBuilder builder(flow_graph, normal_entry); 1065 BlockBuilder builder(flow_graph, normal_entry);
1065 1066
1066 return BuildInvokeMathCFunction(&builder, 1067 return BuildInvokeMathCFunction(&builder,
1067 MethodRecognizer::kMathAtan2, 1068 MethodRecognizer::kMathAtan2,
1068 /* num_parameters = */ 2); 1069 /* num_parameters = */ 2);
1069 } 1070 }
1070 1071
1072
1073 bool Intrinsifier::Build_DoubleMod(FlowGraph* flow_graph) {
1074 if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
1075
1076 GraphEntryInstr* graph_entry = flow_graph->graph_entry();
1077 TargetEntryInstr* normal_entry = graph_entry->normal_entry();
1078 BlockBuilder builder(flow_graph, normal_entry);
1079
1080 return BuildInvokeMathCFunction(&builder,
1081 MethodRecognizer::kDoubleMod,
1082 /* num_parameters = */ 2);
1083 }
1084
1085
1086 bool Intrinsifier::Build_DoubleCeil(FlowGraph* flow_graph) {
1087 if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
1088
1089 GraphEntryInstr* graph_entry = flow_graph->graph_entry();
1090 TargetEntryInstr* normal_entry = graph_entry->normal_entry();
1091 BlockBuilder builder(flow_graph, normal_entry);
1092
1093 return BuildInvokeMathCFunction(&builder,
1094 MethodRecognizer::kDoubleCeil);
1095 }
1096
1097
1098 bool Intrinsifier::Build_DoubleFloor(FlowGraph* flow_graph) {
1099 if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
1100
1101 GraphEntryInstr* graph_entry = flow_graph->graph_entry();
1102 TargetEntryInstr* normal_entry = graph_entry->normal_entry();
1103 BlockBuilder builder(flow_graph, normal_entry);
1104
1105 return BuildInvokeMathCFunction(&builder,
1106 MethodRecognizer::kDoubleFloor);
1107 }
1108
1109
1110 bool Intrinsifier::Build_DoubleTruncate(FlowGraph* flow_graph) {
1111 if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
1112
1113 GraphEntryInstr* graph_entry = flow_graph->graph_entry();
1114 TargetEntryInstr* normal_entry = graph_entry->normal_entry();
1115 BlockBuilder builder(flow_graph, normal_entry);
1116
1117 return BuildInvokeMathCFunction(&builder,
1118 MethodRecognizer::kDoubleTruncate);
1119 }
1120
1121
1122 bool Intrinsifier::Build_DoubleRound(FlowGraph* flow_graph) {
1123 if (!FlowGraphCompiler::SupportsUnboxedDoubles()) return false;
1124
1125 GraphEntryInstr* graph_entry = flow_graph->graph_entry();
1126 TargetEntryInstr* normal_entry = graph_entry->normal_entry();
1127 BlockBuilder builder(flow_graph, normal_entry);
1128
1129 return BuildInvokeMathCFunction(&builder,
1130 MethodRecognizer::kDoubleRound);
1131 }
1132
1071 } // namespace dart 1133 } // 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