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

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

Issue 2976723003: Eliminate dependencies on assemblers and code stubs in precompiled runtime. (Closed)
Patch Set: Created 3 years, 5 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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/branch_optimizer.h" 5 #include "vm/branch_optimizer.h"
6 6
7 #include "vm/flow_graph.h" 7 #include "vm/flow_graph.h"
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #if !defined(DART_PRECOMPILED_RUNTIME)
11
10 namespace dart { 12 namespace dart {
11 13
12 // Returns true if the given phi has a single input use and 14 // Returns true if the given phi has a single input use and
13 // is used in the environments either at the corresponding block entry or 15 // is used in the environments either at the corresponding block entry or
14 // at the same instruction where input use is. 16 // at the same instruction where input use is.
15 static bool PhiHasSingleUse(PhiInstr* phi, Value* use) { 17 static bool PhiHasSingleUse(PhiInstr* phi, Value* use) {
16 if ((use->next_use() != NULL) || (phi->input_use_list() != use)) { 18 if ((use->next_use() != NULL) || (phi->input_use_list() != use)) {
17 return false; 19 return false;
18 } 20 }
19 21
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 if (changed) { 343 if (changed) {
342 // We may have changed the block order and the dominator tree. 344 // We may have changed the block order and the dominator tree.
343 flow_graph->DiscoverBlocks(); 345 flow_graph->DiscoverBlocks();
344 GrowableArray<BitVector*> dominance_frontier; 346 GrowableArray<BitVector*> dominance_frontier;
345 flow_graph->ComputeDominators(&dominance_frontier); 347 flow_graph->ComputeDominators(&dominance_frontier);
346 } 348 }
347 } 349 }
348 350
349 351
350 } // namespace dart 352 } // namespace dart
353
354 #endif // !defined(DART_PRECOMPILED_RUNTIME)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698