tree-predcom.c: Revise general description of the pass.
authorBin Cheng <bin.cheng@arm.com>
Fri, 28 Jul 2017 15:01:28 +0000 (15:01 +0000)
committerBin Cheng <amker@gcc.gnu.org>
Fri, 28 Jul 2017 15:01:28 +0000 (15:01 +0000)
commitd9c259efd71ab62d4994b0ad489aa977f3ff736d
tree8918dfc6533dbf8fd1dcca5c1ef42a87166ecc13
parent10dfaf9a3ba779d219148b863fc94f5fccd15302
tree-predcom.c: Revise general description of the pass.

* tree-predcom.c: Revise general description of the pass.
(enum chain_type): New enum type for store elimination.
(struct chain): New field supporting store elimination.
(struct component): Ditto.
(dump_chain): Dump store-stores chain.
(release_chain): Release resources.
(split_data_refs_to_components): Compute and create component
contains only stores for elimination.
(get_chain_last_ref_at): New function.
(make_invariant_chain): Initialization.
(make_rooted_chain): Specify chain type in parameter and record it.
(add_looparound_copies): Skip for store-stores chain.
(determine_roots_comp): Compute type of chain and pass it to
make_rooted_chain.
(initialize_root_vars_store_elim_2): New function.
(finalize_eliminated_stores): New function.
(remove_stmt): Handle store for elimination.
(execute_pred_commoning_chain): Execute predictive commoning on
store-store chains.
(determine_unroll_factor): Skip unroll for store-stores chain.
(prepare_initializers_chain_store_elim): New function.
(prepare_initializers_chain): Hanlde store-store chain.
(prepare_finalizers_chain, prepare_finalizers): New function.
(tree_predictive_commoning_loop): Return integer value indicating
if loop is unrolled or lcssa form is corrupted.
(tree_predictive_commoning): Rewrite for lcssa form if necessary.

gcc/testsuite
* gcc.dg/tree-ssa/predcom-dse-1.c: New test.
* gcc.dg/tree-ssa/predcom-dse-2.c: New test.
* gcc.dg/tree-ssa/predcom-dse-3.c: New test.
* gcc.dg/tree-ssa/predcom-dse-4.c: New test.
* gcc.dg/tree-ssa/predcom-dse-5.c: New test.
* gcc.dg/tree-ssa/predcom-dse-6.c: New test.
* gcc.dg/tree-ssa/predcom-dse-7.c: New test.
* gcc.dg/tree-ssa/predcom-dse-8.c: New test.
* gcc.dg/tree-ssa/predcom-dse-9.c: New test.
* gcc.dg/tree-ssa/predcom-dse-10.c: New test.
* gcc.dg/tree-ssa/predcom-dse-11.c: New test.

From-SVN: r250669
14 files changed:
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/predcom-dse-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/predcom-dse-10.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/predcom-dse-11.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/predcom-dse-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/predcom-dse-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/predcom-dse-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/predcom-dse-5.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/predcom-dse-6.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/predcom-dse-7.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/predcom-dse-8.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/predcom-dse-9.c [new file with mode: 0644]
gcc/tree-predcom.c