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

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

Issue 136303012: Updates refactoring of CPU feature detection (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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 | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | runtime/vm/intermediate_language.cc » ('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/cpu.h"
9 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
10 #include "vm/flow_graph_builder.h" 11 #include "vm/flow_graph_builder.h"
11 #include "vm/flow_graph_compiler.h" 12 #include "vm/flow_graph_compiler.h"
12 #include "vm/hash_map.h" 13 #include "vm/hash_map.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/object_store.h" 16 #include "vm/object_store.h"
16 #include "vm/parser.h" 17 #include "vm/parser.h"
17 #include "vm/resolver.h" 18 #include "vm/resolver.h"
18 #include "vm/scopes.h" 19 #include "vm/scopes.h"
(...skipping 2752 matching lines...) Expand 10 before | Expand all | Expand 10 after
2771 ReplaceCall(call, d2i_instr); 2772 ReplaceCall(call, d2i_instr);
2772 return true; 2773 return true;
2773 } 2774 }
2774 case MethodRecognizer::kDoubleMod: 2775 case MethodRecognizer::kDoubleMod:
2775 case MethodRecognizer::kDoubleRound: 2776 case MethodRecognizer::kDoubleRound:
2776 ReplaceWithMathCFunction(call, recognized_kind); 2777 ReplaceWithMathCFunction(call, recognized_kind);
2777 return true; 2778 return true;
2778 case MethodRecognizer::kDoubleTruncate: 2779 case MethodRecognizer::kDoubleTruncate:
2779 case MethodRecognizer::kDoubleFloor: 2780 case MethodRecognizer::kDoubleFloor:
2780 case MethodRecognizer::kDoubleCeil: 2781 case MethodRecognizer::kDoubleCeil:
2781 if (!CPUFeatures::double_truncate_round_supported()) { 2782 if (!TargetCPUFeatures::double_truncate_round_supported()) {
2782 ReplaceWithMathCFunction(call, recognized_kind); 2783 ReplaceWithMathCFunction(call, recognized_kind);
2783 } else { 2784 } else {
2784 AddReceiverCheck(call); 2785 AddReceiverCheck(call);
2785 DoubleToDoubleInstr* d2d_instr = 2786 DoubleToDoubleInstr* d2d_instr =
2786 new DoubleToDoubleInstr(new Value(call->ArgumentAt(0)), 2787 new DoubleToDoubleInstr(new Value(call->ArgumentAt(0)),
2787 recognized_kind, call->deopt_id()); 2788 recognized_kind, call->deopt_id());
2788 ReplaceCall(call, d2d_instr); 2789 ReplaceCall(call, d2d_instr);
2789 } 2790 }
2790 return true; 2791 return true;
2791 default: 2792 default:
(...skipping 5852 matching lines...) Expand 10 before | Expand all | Expand 10 after
8644 } 8645 }
8645 8646
8646 // Insert materializations at environment uses. 8647 // Insert materializations at environment uses.
8647 for (intptr_t i = 0; i < exits.length(); i++) { 8648 for (intptr_t i = 0; i < exits.length(); i++) {
8648 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); 8649 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields);
8649 } 8650 }
8650 } 8651 }
8651 8652
8652 8653
8653 } // namespace dart 8654 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698