On Mon, Jun 26, 2017 at 11:47 AM, Bin.Cheng <amker.ch...@gmail.com> wrote: > On Fri, May 12, 2017 at 12:28 PM, Bin Cheng <bin.ch...@arm.com> wrote: >> Hi, >> This patch caches initialization statements and only inserts it for valid >> chains. >> Looks like current code even inserts such stmts for invalid chains which >> will be >> deleted as dead code afterwards. >> >> Bootstrap and test on x86_64 and AArch64, is it OK? > > Ping this one because it's a prerequisite patch for following predcom > enhancement. > Also I updated the patch a little bit. > > Bootstrap and test along with following patches of predcom on x86_64 > and AArch64. Is it OK?
if (stmts) - gsi_insert_seq_on_edge_immediate (entry, stmts); + gimple_seq_add_seq (&chain->init_seq, stmts); use gimple_seq_add_seq_without_update. Ok with that change. Thanks, Richard. > Thanks, > bin > 2017-06-26 Bin Cheng <bin.ch...@arm.com> > > * tree-predcom.c (struct chain): New field init_seq. > (release_chain): Release init_seq. > (prepare_initializers_chain): Record intialization stmts in above > field. Discard it if chain is invalid. > (insert_init_seqs): New function. > (tree_predictive_commoning_loop): Call insert_init_seqs.