]> git.ipfire.org Git - thirdparty/gcc.git/commit
* tree-eh.h (unsplit_eh_edges): Declare.
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 Oct 2019 13:35:40 +0000 (13:35 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 Oct 2019 13:35:40 +0000 (13:35 +0000)
commit393122a0333589ed4939b80b15fb76ced573e5cd
treeec7b30ac680b7f471fc578669ea999a323bfd15f
parent190c11dc2e2af9374a032a3f85931ef6a655fab1
* tree-eh.h (unsplit_eh_edges): Declare.
* tree-eh.c (maybe_remove_unreachable_handlers): Detect more cases.
(unsplit_eh_edges): New function wrapping unsplit_all_eh.
* gimple-ssa-store-merging.c: Include cfganal.h cfgcleanup.h except.h.
(struct store_immediate_info): Add lp_nr field.
(store_immediate_info::store_immediate_info): Add NR2 parameter and
initialize lp_nr with it.
(struct merged_store_group): Add lp_nr and only_constants fields.
(merged_store_group::merged_store_group): Initialize them.
(merged_store_group::can_be_merged_into): Deal with them.
(pass_store_merging): Rename terminate_and_release_chain into
terminate_and_process_chain.
(pass_store_merging::terminate_and_process_all_chains): Adjust to above
renaming and remove useless assertions.
(pass_store_merging::terminate_all_aliasing_chains): Small tweak.
(stmts_may_clobber_ref_p): Be prepared for different basic blocks.
(imm_store_chain_info::coalesce_immediate_stores): Use only_constants
instead of always recomputing it and compare lp_nr.
(imm_store_chain_info::output_merged_store): If the group is in an
active EH region, register new stores if they can throw.  Moreover,
if the insertion has created new basic blocks, adjust the PHI nodes
of the post landing pad.
(imm_store_chain_info::output_merged_stores): If the original stores
are in an active EH region, deregister them.
(lhs_valid_for_store_merging_p): Prettify.
(adjust_bit_pos): New function extracted from...
(mem_valid_for_store_merging): ...here.  Use it for the base address
and also for the offset if it is the addition of a constant.
(lp_nr_for_store): New function.
(pass_store_merging::process_store): Change return type to bool.
Call lp_nr_for_store to initialize the store info.  Propagate the
return status of various called functions to the return value.
(store_valid_for_store_merging_p): New predicate.
(enum basic_block_status): New enumeration.
(get_status_for_store_merging): New function.
(pass_store_merging::execute): If the function can throw and catch
non-call exceptions, unsplit the EH edges on entry and clean up the
CFG on exit if something changed.  Call get_status_for_store_merging
for every basic block and keep the chains open across basic blocks
when possible.  Terminate and process open chains at the end, if any.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@276459 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/gimple-ssa-store-merging.c
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/opt82.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/opt82_pkg.ads [new file with mode: 0644]
gcc/tree-eh.c
gcc/tree-eh.h