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

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

Issue 627103005: Unrolls array initialization loop for small arrays. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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_arm.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/cpu.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after
1706 ExternalTypedData::data_offset()); 1706 ExternalTypedData::data_offset());
1707 *cursor = flow_graph()->AppendTo(*cursor, 1707 *cursor = flow_graph()->AppendTo(*cursor,
1708 elements, 1708 elements,
1709 NULL, 1709 NULL,
1710 FlowGraph::kValue); 1710 FlowGraph::kValue);
1711 *array = elements; 1711 *array = elements;
1712 } 1712 }
1713 return array_cid; 1713 return array_cid;
1714 } 1714 }
1715 1715
1716
1716 bool FlowGraphOptimizer::InlineGetIndexed(MethodRecognizer::Kind kind, 1717 bool FlowGraphOptimizer::InlineGetIndexed(MethodRecognizer::Kind kind,
1717 Instruction* call, 1718 Instruction* call,
1718 Definition* receiver, 1719 Definition* receiver,
1719 const ICData& ic_data, 1720 const ICData& ic_data,
1720 TargetEntryInstr** entry, 1721 TargetEntryInstr** entry,
1721 Definition** last) { 1722 Definition** last) {
1722 intptr_t array_cid = MethodKindToCid(kind); 1723 intptr_t array_cid = MethodKindToCid(kind);
1723 ASSERT(array_cid != kIllegalCid); 1724 ASSERT(array_cid != kIllegalCid);
1724 1725
1725 Definition* array = receiver; 1726 Definition* array = receiver;
(...skipping 8394 matching lines...) Expand 10 before | Expand all | Expand 10 after
10120 10121
10121 // Insert materializations at environment uses. 10122 // Insert materializations at environment uses.
10122 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { 10123 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) {
10123 CreateMaterializationAt( 10124 CreateMaterializationAt(
10124 exits_collector_.exits()[i], alloc, alloc->cls(), *slots); 10125 exits_collector_.exits()[i], alloc, alloc->cls(), *slots);
10125 } 10126 }
10126 } 10127 }
10127 10128
10128 10129
10129 } // namespace dart 10130 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698