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

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

Issue 11344011: Relational comparisons for unboxed mints. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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
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 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 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 instr->env(), 1266 instr->env(),
1267 Definition::kEffect); 1267 Definition::kEffect);
1268 optimizer->InsertBefore( 1268 optimizer->InsertBefore(
1269 instr, 1269 instr,
1270 new CheckSmiInstr(comp->right()->Copy(), comp->deopt_id()), 1270 new CheckSmiInstr(comp->right()->Copy(), comp->deopt_id()),
1271 instr->env(), 1271 instr->env(),
1272 Definition::kEffect); 1272 Definition::kEffect);
1273 comp->set_operands_class_id(kSmiCid); 1273 comp->set_operands_class_id(kSmiCid);
1274 } else if (ShouldSpecializeForDouble(ic_data)) { 1274 } else if (ShouldSpecializeForDouble(ic_data)) {
1275 comp->set_operands_class_id(kDoubleCid); 1275 comp->set_operands_class_id(kDoubleCid);
1276 } else if (HasTwoMintOrSmi(*comp->ic_data()) &&
1277 FlowGraphCompiler::SupportsUnboxedMints()) {
1278 comp->set_operands_class_id(kMintCid);
1276 } else if (comp->ic_data()->AllReceiversAreNumbers()) { 1279 } else if (comp->ic_data()->AllReceiversAreNumbers()) {
1277 comp->set_operands_class_id(kNumberCid); 1280 comp->set_operands_class_id(kNumberCid);
1278 } 1281 }
1279 } 1282 }
1280 1283
1281 void FlowGraphOptimizer::VisitRelationalOp(RelationalOpInstr* instr) { 1284 void FlowGraphOptimizer::VisitRelationalOp(RelationalOpInstr* instr) {
1282 HandleRelationalOp(this, instr, instr); 1285 HandleRelationalOp(this, instr, instr);
1283 } 1286 }
1284 1287
1285 1288
(...skipping 2237 matching lines...) Expand 10 before | Expand all | Expand 10 after
3523 3526
3524 if (FLAG_trace_constant_propagation) { 3527 if (FLAG_trace_constant_propagation) {
3525 OS::Print("\n==== After constant propagation ====\n"); 3528 OS::Print("\n==== After constant propagation ====\n");
3526 FlowGraphPrinter printer(*graph_); 3529 FlowGraphPrinter printer(*graph_);
3527 printer.PrintBlocks(); 3530 printer.PrintBlocks();
3528 } 3531 }
3529 } 3532 }
3530 3533
3531 3534
3532 } // namespace dart 3535 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.h » ('j') | runtime/vm/intermediate_language_ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698