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

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

Issue 12049056: Use builtin fmod for double modulo operation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 4
5 #include "vm/flow_graph_optimizer.h" 5 #include "vm/flow_graph_optimizer.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/cha.h" 8 #include "vm/cha.h"
9 #include "vm/flow_graph_builder.h" 9 #include "vm/flow_graph_builder.h"
10 #include "vm/flow_graph_compiler.h" 10 #include "vm/flow_graph_compiler.h"
(...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 d2i_instr = new DoubleToIntegerInstr(call->ArgumentAt(0)->value(), 1363 d2i_instr = new DoubleToIntegerInstr(call->ArgumentAt(0)->value(),
1364 call); 1364 call);
1365 } else { 1365 } else {
1366 // Optimistically assume result fits into Smi. 1366 // Optimistically assume result fits into Smi.
1367 d2i_instr = new DoubleToSmiInstr(call->ArgumentAt(0)->value(), call); 1367 d2i_instr = new DoubleToSmiInstr(call->ArgumentAt(0)->value(), call);
1368 } 1368 }
1369 call->ReplaceWith(d2i_instr, current_iterator()); 1369 call->ReplaceWith(d2i_instr, current_iterator());
1370 RemovePushArguments(call); 1370 RemovePushArguments(call);
1371 return true; 1371 return true;
1372 } 1372 }
1373 case MethodRecognizer::kDoubleMod:
1373 case MethodRecognizer::kDoublePow: 1374 case MethodRecognizer::kDoublePow:
1374 ReplaceWithMathCFunction(call, recognized_kind); 1375 ReplaceWithMathCFunction(call, recognized_kind);
1375 return true; 1376 return true;
1376 case MethodRecognizer::kDoubleTruncate: 1377 case MethodRecognizer::kDoubleTruncate:
1377 case MethodRecognizer::kDoubleRound: 1378 case MethodRecognizer::kDoubleRound:
1378 case MethodRecognizer::kDoubleFloor: 1379 case MethodRecognizer::kDoubleFloor:
1379 case MethodRecognizer::kDoubleCeil: 1380 case MethodRecognizer::kDoubleCeil:
1380 if (!CPUFeatures::double_truncate_round_supported()) { 1381 if (!CPUFeatures::double_truncate_round_supported()) {
1381 ReplaceWithMathCFunction(call, recognized_kind); 1382 ReplaceWithMathCFunction(call, recognized_kind);
1382 } else { 1383 } else {
(...skipping 3213 matching lines...) Expand 10 before | Expand all | Expand 10 after
4596 4597
4597 if (FLAG_trace_constant_propagation) { 4598 if (FLAG_trace_constant_propagation) {
4598 OS::Print("\n==== After constant propagation ====\n"); 4599 OS::Print("\n==== After constant propagation ====\n");
4599 FlowGraphPrinter printer(*graph_); 4600 FlowGraphPrinter printer(*graph_);
4600 printer.PrintBlocks(); 4601 printer.PrintBlocks();
4601 } 4602 }
4602 } 4603 }
4603 4604
4604 4605
4605 } // namespace dart 4606 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698