Refactor dominance.c: define dom_info as C++ class
authorMikhail Maltsev <maltsevm@gmail.com>
Sat, 22 Aug 2015 03:20:13 +0000 (03:20 +0000)
committerMikhail Maltsev <miyuki@gcc.gnu.org>
Sat, 22 Aug 2015 03:20:13 +0000 (03:20 +0000)
commit2321dd914f1f8a77cb01981ef25d1d9681aff482
tree9f36c7ba32ec138d38747595ad4fbc7e565e0d8b
parent18e8c3cad5c822fc4fa3d5a1c91bf9be6c1458be
Refactor dominance.c: define dom_info as C++ class

gcc/
* dominance.c (new_zero_array): Define.
(dom_info): Redefine as class with proper encapsulation.
(dom_info::m_n_basic_blocks, m_reverse, m_start_block, m_end_block):
Add new members.
(dom_info::dom_info, ~dom_info): Define.  Use new/delete for memory
allocations/deallocations.  Pass function as parameter (instead of
using cfun).
(dom_info::get_idom): Define accessor method.
(dom_info::calc_dfs_tree_nonrec, calc_dfs_tree, compress, eval,
link_roots, calc_idoms): Redefine as class members.  Do not use cfun.
(calculate_dominance_info): Adjust to use dom_info class.
(verify_dominators): Likewise.

From-SVN: r227093
gcc/ChangeLog
gcc/dominance.c