]> gcc.gnu.org Git - gcc.git/commit
predcom: Refactor more by encapsulating global states
authorKewen Lin <linkw@linux.ibm.com>
Thu, 24 Jun 2021 08:45:29 +0000 (03:45 -0500)
committerKewen Lin <linkw@linux.ibm.com>
Thu, 24 Jun 2021 08:45:29 +0000 (03:45 -0500)
commit8d8ed5c8b52171b663975cd46233de9f9fd80323
tree1b4996ed26a8505617ff847678c5668a543e165b
parent7dcf139a2b8e1c53096ee2593cfdd706d5d358a8
predcom: Refactor more by encapsulating global states

This patch is to encapsulate global states into a class and
making their accessors as member functions, remove some
consequent useless clean up code, and do some clean up with
RAII.

Bootstrapped/regtested on powerpc64le-linux-gnu P9,
x86_64-redhat-linux and aarch64-linux-gnu, also
bootstrapped on ppc64le P9 with bootstrap-O3 config.

gcc/ChangeLog:

* tree-predcom.c (class pcom_worker): New class.
(release_chain): Renamed to...
(pcom_worker::release_chain): ...this.
(release_chains): Renamed to...
(pcom_worker::release_chains): ...this.
(aff_combination_dr_offset): Renamed to...
(pcom_worker::aff_combination_dr_offset): ...this.
(determine_offset): Renamed to...
(pcom_worker::determine_offset): ...this.
(class comp_ptrs): New class.
(split_data_refs_to_components): Renamed to...
(pcom_worker::split_data_refs_to_components): ...this,
and update with class comp_ptrs.
(suitable_component_p): Renamed to...
(pcom_worker::suitable_component_p): ...this.
(filter_suitable_components): Renamed to...
(pcom_worker::filter_suitable_components): ...this.
(valid_initializer_p): Renamed to...
(pcom_worker::valid_initializer_p): ...this.
(find_looparound_phi): Renamed to...
(pcom_worker::find_looparound_phi): ...this.
(add_looparound_copies): Renamed to...
(pcom_worker::add_looparound_copies): ...this.
(determine_roots_comp): Renamed to...
(pcom_worker::determine_roots_comp): ...this.
(determine_roots): Renamed to...
(pcom_worker::determine_roots): ...this.
(single_nonlooparound_use): Renamed to...
(pcom_worker::single_nonlooparound_use): ...this.
(remove_stmt): Renamed to...
(pcom_worker::remove_stmt): ...this.
(execute_pred_commoning_chain): Renamed to...
(pcom_worker::execute_pred_commoning_chain): ...this.
(execute_pred_commoning): Renamed to...
(pcom_worker::execute_pred_commoning): ...this.
(struct epcc_data): New member worker.
(execute_pred_commoning_cbck): Call execute_pred_commoning
with pcom_worker pointer.
(find_use_stmt): Renamed to...
(pcom_worker::find_use_stmt): ...this.
(find_associative_operation_root): Renamed to...
(pcom_worker::find_associative_operation_root): ...this.
(find_common_use_stmt): Renamed to...
(pcom_worker::find_common_use_stmt): ...this.
(combinable_refs_p): Renamed to...
(pcom_worker::combinable_refs_p): ...this.
(reassociate_to_the_same_stmt): Renamed to...
(pcom_worker::reassociate_to_the_same_stmt): ...this.
(stmt_combining_refs): Renamed to...
(pcom_worker::stmt_combining_refs): ...this.
(combine_chains): Renamed to...
(pcom_worker::combine_chains): ...this.
(try_combine_chains): Renamed to...
(pcom_worker::try_combine_chains): ...this.
(prepare_initializers_chain): Renamed to...
(pcom_worker::prepare_initializers_chain): ...this.
(prepare_initializers): Renamed to...
(pcom_worker::prepare_initializers): ...this.
(prepare_finalizers_chain): Renamed to...
(pcom_worker::prepare_finalizers_chain): ...this.
(prepare_finalizers): Renamed to...
(pcom_worker::prepare_finalizers): ...this.
(tree_predictive_commoning_loop): Renamed to...
(pcom_worker::tree_predictive_commoning_loop): ...this, adjust
some calls and remove some cleanup code.
(tree_predictive_commoning): Adjusted to use pcom_worker instance.
(static variable looparound_phis): Remove.
(static variable name_expansions): Remove.
gcc/tree-predcom.c
This page took 0.05526 seconds and 5 git commands to generate.