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

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

Issue 99203010: Alternative Timer implementation using simply list-based priority heap. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add TODO Created 7 years 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 | sdk/lib/io/timer_impl.dart » ('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 4380 matching lines...) Expand 10 before | Expand all | Expand 10 after
4391 bool inputs_loop_invariant = true; 4391 bool inputs_loop_invariant = true;
4392 for (int i = 0; i < current->InputCount(); ++i) { 4392 for (int i = 0; i < current->InputCount(); ++i) {
4393 Definition* input_def = current->InputAt(i)->definition(); 4393 Definition* input_def = current->InputAt(i)->definition();
4394 if (!input_def->GetBlock()->Dominates(pre_header)) { 4394 if (!input_def->GetBlock()->Dominates(pre_header)) {
4395 inputs_loop_invariant = false; 4395 inputs_loop_invariant = false;
4396 break; 4396 break;
4397 } 4397 }
4398 } 4398 }
4399 if (inputs_loop_invariant && 4399 if (inputs_loop_invariant &&
4400 !current->IsAssertAssignable() && 4400 !current->IsAssertAssignable() &&
4401 !current->IsAssertBoolean()) { 4401 !current->IsAssertBoolean() &&
4402 !current->IsGuardField()) {
4402 // TODO(fschneider): Enable hoisting of Assert-instructions 4403 // TODO(fschneider): Enable hoisting of Assert-instructions
4403 // if it safe to do. 4404 // if it safe to do.
4405 // TODO(15652): Hoisting guard-field instructions causes the
4406 // optimizing compiler to crash.
4404 Hoist(&it, pre_header, current); 4407 Hoist(&it, pre_header, current);
4405 } else if (current->IsCheckSmi() && 4408 } else if (current->IsCheckSmi() &&
4406 current->InputAt(0)->definition()->IsPhi()) { 4409 current->InputAt(0)->definition()->IsPhi()) {
4407 TryHoistCheckSmiThroughPhi( 4410 TryHoistCheckSmiThroughPhi(
4408 &it, header, pre_header, current->AsCheckSmi()); 4411 &it, header, pre_header, current->AsCheckSmi());
4409 } 4412 }
4410 } 4413 }
4411 } 4414 }
4412 } 4415 }
4413 } 4416 }
(...skipping 3658 matching lines...) Expand 10 before | Expand all | Expand 10 after
8072 } 8075 }
8073 8076
8074 // Insert materializations at environment uses. 8077 // Insert materializations at environment uses.
8075 for (intptr_t i = 0; i < exits.length(); i++) { 8078 for (intptr_t i = 0; i < exits.length(); i++) {
8076 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); 8079 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields);
8077 } 8080 }
8078 } 8081 }
8079 8082
8080 8083
8081 } // namespace dart 8084 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/io/timer_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698