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

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

Issue 11783006: Intrinsify Uint8ClampedArray's store and load indexed, inline load indexed. (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
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 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 651
652 bool FlowGraphOptimizer::TryReplaceWithLoadIndexed(InstanceCallInstr* call) { 652 bool FlowGraphOptimizer::TryReplaceWithLoadIndexed(InstanceCallInstr* call) {
653 const intptr_t class_id = ReceiverClassId(call); 653 const intptr_t class_id = ReceiverClassId(call);
654 switch (class_id) { 654 switch (class_id) {
655 case kArrayCid: 655 case kArrayCid:
656 case kImmutableArrayCid: 656 case kImmutableArrayCid:
657 case kGrowableObjectArrayCid: 657 case kGrowableObjectArrayCid:
658 case kFloat32ArrayCid: 658 case kFloat32ArrayCid:
659 case kFloat64ArrayCid: 659 case kFloat64ArrayCid:
660 case kUint8ArrayCid: 660 case kUint8ArrayCid:
661 case kUint8ClampedArrayCid:
661 case kExternalUint8ArrayCid: 662 case kExternalUint8ArrayCid:
662 // Acceptable load index classes. 663 // Acceptable load index classes.
663 break; 664 break;
664 default: 665 default:
665 return false; 666 return false;
666 } 667 }
667 Value* array = NULL; 668 Value* array = NULL;
668 Value* index = NULL; 669 Value* index = NULL;
669 intptr_t array_cid = PrepareIndexedOp(call, class_id, &array, &index); 670 intptr_t array_cid = PrepareIndexedOp(call, class_id, &array, &index);
670 Definition* array_op = new LoadIndexedInstr(array, index, array_cid); 671 Definition* array_op = new LoadIndexedInstr(array, index, array_cid);
(...skipping 3756 matching lines...) Expand 10 before | Expand all | Expand 10 after
4427 4428
4428 if (FLAG_trace_constant_propagation) { 4429 if (FLAG_trace_constant_propagation) {
4429 OS::Print("\n==== After constant propagation ====\n"); 4430 OS::Print("\n==== After constant propagation ====\n");
4430 FlowGraphPrinter printer(*graph_); 4431 FlowGraphPrinter printer(*graph_);
4431 printer.PrintBlocks(); 4432 printer.PrintBlocks();
4432 } 4433 }
4433 } 4434 }
4434 4435
4435 4436
4436 } // namespace dart 4437 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698