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

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

Issue 19779011: Minor cleanup: use deopt-id instead od static call instruction as argument for MathSqrtInstr. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flow_graph_builder.h" 10 #include "vm/flow_graph_builder.h"
(...skipping 2480 matching lines...) Expand 10 before | Expand all | Expand 10 after
2491 instr->ReplaceWith(call, current_iterator()); 2491 instr->ReplaceWith(call, current_iterator());
2492 } 2492 }
2493 } 2493 }
2494 2494
2495 2495
2496 void FlowGraphOptimizer::VisitStaticCall(StaticCallInstr* call) { 2496 void FlowGraphOptimizer::VisitStaticCall(StaticCallInstr* call) {
2497 MethodRecognizer::Kind recognized_kind = 2497 MethodRecognizer::Kind recognized_kind =
2498 MethodRecognizer::RecognizeKind(call->function()); 2498 MethodRecognizer::RecognizeKind(call->function());
2499 if (recognized_kind == MethodRecognizer::kMathSqrt) { 2499 if (recognized_kind == MethodRecognizer::kMathSqrt) {
2500 MathSqrtInstr* sqrt = 2500 MathSqrtInstr* sqrt =
2501 new MathSqrtInstr(new Value(call->ArgumentAt(0)), call); 2501 new MathSqrtInstr(new Value(call->ArgumentAt(0)), call->deopt_id());
2502 ReplaceCall(call, sqrt); 2502 ReplaceCall(call, sqrt);
2503 } else if (recognized_kind == MethodRecognizer::kFloat32x4Zero) { 2503 } else if (recognized_kind == MethodRecognizer::kFloat32x4Zero) {
2504 Float32x4ZeroInstr* zero = new Float32x4ZeroInstr(call->deopt_id()); 2504 Float32x4ZeroInstr* zero = new Float32x4ZeroInstr(call->deopt_id());
2505 ReplaceCall(call, zero); 2505 ReplaceCall(call, zero);
2506 } else if (recognized_kind == MethodRecognizer::kFloat32x4Splat) { 2506 } else if (recognized_kind == MethodRecognizer::kFloat32x4Splat) {
2507 Float32x4SplatInstr* splat = 2507 Float32x4SplatInstr* splat =
2508 new Float32x4SplatInstr(new Value(call->ArgumentAt(1)), 2508 new Float32x4SplatInstr(new Value(call->ArgumentAt(1)),
2509 call->deopt_id()); 2509 call->deopt_id());
2510 ReplaceCall(call, splat); 2510 ReplaceCall(call, splat);
2511 } else if (recognized_kind == MethodRecognizer::kFloat32x4Constructor) { 2511 } else if (recognized_kind == MethodRecognizer::kFloat32x4Constructor) {
(...skipping 4683 matching lines...) Expand 10 before | Expand all | Expand 10 after
7195 7195
7196 // Insert materializations at environment uses. 7196 // Insert materializations at environment uses.
7197 const Class& cls = Class::Handle(alloc->constructor().Owner()); 7197 const Class& cls = Class::Handle(alloc->constructor().Owner());
7198 for (intptr_t i = 0; i < exits.length(); i++) { 7198 for (intptr_t i = 0; i < exits.length(); i++) {
7199 CreateMaterializationAt(exits[i], alloc, cls, *fields); 7199 CreateMaterializationAt(exits[i], alloc, cls, *fields);
7200 } 7200 }
7201 } 7201 }
7202 7202
7203 7203
7204 } // namespace dart 7204 } // 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