stabilize store merging
commit3a3ba7de444a2a23e38fd28c0770b5f5d3013f87
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Mar 2017 23:31:01 +0000 (16 23:31 +0000)
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Mar 2017 23:31:01 +0000 (16 23:31 +0000)
tree7905059192c02cdbcd9b49414ebc7f6cc04d07ae
parent85d41712eb8d58db22548b408f70b83ebe6691fc
stabilize store merging

Don't let pointer randomization change the order in which we process
store chains.  This may cause SSA_NAMEs to be released in different
order, and if they're reused later, they may cause differences in SSA
partitioning, leading to differences in expand, and ultimately to
different code.

bootstrap-debug-lean (-fcompare-debug) on i686-linux-gnu has failed in
haifa-sched.c since r245196 exposed the latent ordering problem in
store merging.  In this case, the IR differences (different SSA names
selected for copies in out-of-SSA, resulting in some off-by-one
differences in pseudos) were not significant enough to be visible in
the compiler output.

for  gcc/ChangeLog

* gimple-ssa-store-merging.c (struct imm_store_chain_info):
Add linked-list forward and backlinks.  Insert on
construction, remove on destruction.
(class pass_store_merging): Add m_stores_head field.
(pass_store_merging::terminate_and_process_all_chains):
Iterate over m_stores_head list.
(pass_store_merging::terminate_all_aliasing_chains):
Likewise.
(pass_store_merging::execute): Check for debug stmts first.
Push new chains onto the m_stores_head stack.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246213 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/gimple-ssa-store-merging.c