| OLD | NEW |
| 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 #ifndef VM_FLOW_GRAPH_H_ | 5 #ifndef VM_FLOW_GRAPH_H_ |
| 6 #define VM_FLOW_GRAPH_H_ | 6 #define VM_FLOW_GRAPH_H_ |
| 7 | 7 |
| 8 #include "vm/growable_array.h" | 8 #include "vm/growable_array.h" |
| 9 #include "vm/intermediate_language.h" | 9 #include "vm/intermediate_language.h" |
| 10 #include "vm/parser.h" | 10 #include "vm/parser.h" |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 // Update live-in set for the given block: live-in should contain | 347 // Update live-in set for the given block: live-in should contain |
| 348 // all values that are live-out from the block and are not defined | 348 // all values that are live-out from the block and are not defined |
| 349 // by this block. | 349 // by this block. |
| 350 // Returns true if live-in set was changed. | 350 // Returns true if live-in set was changed. |
| 351 bool UpdateLiveIn(const BlockEntryInstr& instr); | 351 bool UpdateLiveIn(const BlockEntryInstr& instr); |
| 352 | 352 |
| 353 // Perform fix-point iteration updating live-out and live-in sets | 353 // Perform fix-point iteration updating live-out and live-in sets |
| 354 // for blocks until they stop changing. | 354 // for blocks until they stop changing. |
| 355 void ComputeLiveInAndLiveOutSets(); | 355 void ComputeLiveInAndLiveOutSets(); |
| 356 | 356 |
| 357 Isolate* isolate() const { return isolate_; } |
| 358 |
| 359 Isolate* isolate_; |
| 360 |
| 357 const intptr_t variable_count_; | 361 const intptr_t variable_count_; |
| 358 | 362 |
| 359 const GrowableArray<BlockEntryInstr*>& postorder_; | 363 const GrowableArray<BlockEntryInstr*>& postorder_; |
| 360 | 364 |
| 361 // Live-out sets for each block. They contain indices of variables | 365 // Live-out sets for each block. They contain indices of variables |
| 362 // that are live out from this block: that is values that were either | 366 // that are live out from this block: that is values that were either |
| 363 // defined in this block or live into it and that are used in some | 367 // defined in this block or live into it and that are used in some |
| 364 // successor block. | 368 // successor block. |
| 365 GrowableArray<BitVector*> live_out_; | 369 GrowableArray<BitVector*> live_out_; |
| 366 | 370 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 // Per block sets of available blocks. Block A is available at the block B if | 402 // Per block sets of available blocks. Block A is available at the block B if |
| 399 // and only if A dominates B and all paths from A to B are free of side | 403 // and only if A dominates B and all paths from A to B are free of side |
| 400 // effects. | 404 // effects. |
| 401 GrowableArray<BitVector*> available_at_; | 405 GrowableArray<BitVector*> available_at_; |
| 402 }; | 406 }; |
| 403 | 407 |
| 404 | 408 |
| 405 } // namespace dart | 409 } // namespace dart |
| 406 | 410 |
| 407 #endif // VM_FLOW_GRAPH_H_ | 411 #endif // VM_FLOW_GRAPH_H_ |
| OLD | NEW |