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

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

Issue 2771013002: Add more safe points in compiler (Closed)
Patch Set: Fix test that 'parses' verbose GC output Created 3 years, 8 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
« no previous file with comments | « runtime/vm/precompiler.cc ('k') | runtime/vm/scavenger.h » ('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) 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/redundancy_elimination.h" 5 #include "vm/redundancy_elimination.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/flow_graph.h" 8 #include "vm/flow_graph.h"
9 #include "vm/hash_map.h" 9 #include "vm/hash_map.h"
10 #include "vm/il_printer.h" 10 #include "vm/il_printer.h"
(...skipping 2384 matching lines...) Expand 10 before | Expand all | Expand 10 after
2395 // then add instruction to the map so that it does not kill itself. 2395 // then add instruction to the map so that it does not kill itself.
2396 ASSERT(current->Effects().IsNone() || current->Dependencies().IsNone()); 2396 ASSERT(current->Effects().IsNone() || current->Dependencies().IsNone());
2397 map->Insert(current); 2397 map->Insert(current);
2398 } 2398 }
2399 2399
2400 map->RemoveAffected(current->Effects()); 2400 map->RemoveAffected(current->Effects());
2401 } 2401 }
2402 2402
2403 // Process children in the dominator tree recursively. 2403 // Process children in the dominator tree recursively.
2404 intptr_t num_children = block->dominated_blocks().length(); 2404 intptr_t num_children = block->dominated_blocks().length();
2405 if (num_children != 0) {
2406 graph->thread()->CheckForSafepoint();
2407 }
2405 for (intptr_t i = 0; i < num_children; ++i) { 2408 for (intptr_t i = 0; i < num_children; ++i) {
2406 BlockEntryInstr* child = block->dominated_blocks()[i]; 2409 BlockEntryInstr* child = block->dominated_blocks()[i];
2407 if (i < num_children - 1) { 2410 if (i < num_children - 1) {
2408 // Copy map. 2411 // Copy map.
2409 CSEInstructionMap child_map(*map); 2412 CSEInstructionMap child_map(*map);
2410 changed = OptimizeRecursive(graph, child, &child_map) || changed; 2413 changed = OptimizeRecursive(graph, child, &child_map) || changed;
2411 } else { 2414 } else {
2412 // Reuse map for the last child. 2415 // Reuse map for the last child.
2413 changed = OptimizeRecursive(graph, child, map) || changed; 2416 changed = OptimizeRecursive(graph, child, map) || changed;
2414 } 2417 }
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
3374 join->phis_ = NULL; 3377 join->phis_ = NULL;
3375 } else { 3378 } else {
3376 join->phis_->TruncateTo(to_index); 3379 join->phis_->TruncateTo(to_index);
3377 } 3380 }
3378 } 3381 }
3379 } 3382 }
3380 } 3383 }
3381 3384
3382 3385
3383 } // namespace dart 3386 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/precompiler.cc ('k') | runtime/vm/scavenger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698