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

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

Issue 10949022: Fix a typo in an input index computation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 | no next file » | 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) 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/hash_map.h" 10 #include "vm/hash_map.h"
(...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after
1502 } 1502 }
1503 } 1503 }
1504 1504
1505 if ((non_smi_input == kNotFound) || 1505 if ((non_smi_input == kNotFound) ||
1506 (phi->block()->PredecessorAt(non_smi_input) != pre_header)) { 1506 (phi->block()->PredecessorAt(non_smi_input) != pre_header)) {
1507 return; 1507 return;
1508 } 1508 }
1509 1509
1510 // Host CheckSmi instruction and make this phi smi one. 1510 // Host CheckSmi instruction and make this phi smi one.
1511 Hoist(it, pre_header, current); 1511 Hoist(it, pre_header, current);
1512 current->SetInputAt(non_smi_input, phi->InputAt(non_smi_input)); 1512 current->SetInputAt(0, phi->InputAt(non_smi_input));
1513 phi->SetPropagatedCid(kSmiCid); 1513 phi->SetPropagatedCid(kSmiCid);
1514 } 1514 }
1515 1515
1516 1516
1517 void LICM::Optimize(FlowGraph* flow_graph) { 1517 void LICM::Optimize(FlowGraph* flow_graph) {
1518 GrowableArray<BlockEntryInstr*> loop_headers; 1518 GrowableArray<BlockEntryInstr*> loop_headers;
1519 flow_graph->ComputeLoops(&loop_headers); 1519 flow_graph->ComputeLoops(&loop_headers);
1520 1520
1521 for (intptr_t i = 0; i < loop_headers.length(); ++i) { 1521 for (intptr_t i = 0; i < loop_headers.length(); ++i) {
1522 BlockEntryInstr* header = loop_headers[i]; 1522 BlockEntryInstr* header = loop_headers[i];
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
2456 it.Advance()) { 2456 it.Advance()) {
2457 JoinEntryInstr* join = it.Current()->AsJoinEntry(); 2457 JoinEntryInstr* join = it.Current()->AsJoinEntry();
2458 if (join != NULL) join->EliminateUnreachablePhiInputs(); 2458 if (join != NULL) join->EliminateUnreachablePhiInputs();
2459 } 2459 }
2460 2460
2461 graph_->ComputeUseLists(); 2461 graph_->ComputeUseLists();
2462 } 2462 }
2463 2463
2464 2464
2465 } // namespace dart 2465 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698