On Wed, 11 Sep 2019, Kewen.Lin wrote: > Hi, > > Sorry for the late update. I've updated the words of target hooks part. > > Could someone help to review it? Thanks in advance! > > By the way, as previous emails in this thread, Bin has approved the IVOPTs > part, while Segher has approved the rs6000 part. The target hooks part is OK. I guess we'll have to extend it eventually in case other targets want to make use of it. Thanks, Richard. > > Thanks, > Kewen > > ----- > > gcc/ChangeLog > > 2019-09-11 Kewen Lin > > PR middle-end/80791 > * config/rs6000/rs6000.c (TARGET_HAVE_COUNT_REG_DECR_P): New macro. > (TARGET_DOLOOP_COST_FOR_GENERIC): Likewise. > (TARGET_DOLOOP_COST_FOR_ADDRESS): Likewise. > * target.def (have_count_reg_decr_p): New hook. > (doloop_cost_for_generic): Likewise. > (doloop_cost_for_address): Likewise. > * doc/tm.texi.in (TARGET_HAVE_COUNT_REG_DECR_P): Likewise. > (TARGET_DOLOOP_COST_FOR_GENERIC): Likewise. > (TARGET_DOLOOP_COST_FOR_ADDRESS): Likewise. > * doc/tm.texi: Regenerate. > * tree-ssa-loop-ivopts.c (comp_cost::operator+=): Consider infinite cost > addend. > (record_group): Init doloop_p. > (add_candidate_1): Add optional argument doloop, change the handlings > accordingly. > (add_candidate): Likewise. > (generic_predict_doloop_p): Update attribute. > (force_expr_to_var_cost): Add costing for expressions COND_EXPR/LT_EXPR/ > LE_EXPR/GT_EXPR/GE_EXPR/EQ_EXPR/NE_EXPR/UNORDERED_EXPR/ORDERED_EXPR/ > UNLT_EXPR/UNLE_EXPR/UNGT_EXPR/UNGE_EXPR/UNEQ_EXPR/LTGT_EXPR/MAX_EXPR/ > MIN_EXPR. > (get_computation_cost): Update for doloop IV cand extra cost. > (determine_group_iv_cost_cond): Update for doloop IV cand. > (determine_iv_cost): Likewise. > (ivopts_estimate_reg_pressure): Likewise. > (may_eliminate_iv): Update handlings for doloop IV cand. > (add_iv_candidate_for_doloop): New function. > (find_iv_candidates): Call function add_iv_candidate_for_doloop. > (iv_ca_set_no_cp): Update for doloop IV cand. > (iv_ca_set_cp): Likewise. > (iv_ca_dump): Dump register cost. > (find_doloop_use): New function. > (analyze_and_mark_doloop_use): Likewise. > (tree_ssa_iv_optimize_loop): Call function analyze_and_mark_doloop_use. > > gcc/testsuite/ChangeLog > > 2019-09-11 Kewen Lin > > PR middle-end/80791 > * gcc.dg/tree-ssa/ivopts-3.c: Adjust for doloop change. > * gcc.dg/tree-ssa/ivopts-lt.c: Likewise. > * gcc.dg/tree-ssa/pr32044.c: Likewise. > > > on 2019/8/23 下午6:18, Segher Boessenkool wrote: > > Hi! > > > > On Fri, Aug 23, 2019 at 05:43:32PM +0800, Bin.Cheng wrote: > >> On Fri, Aug 23, 2019 at 4:27 PM Kewen.Lin wrote: > >> Not sure if non-ivopts parts are already approved? If so, the patch > >> is okay with above issues addressed. > > > > The rs6000 part is fine. The target.def entries need some spell check > > and copy-editing, but are obvious and trivial otherwise, and/or you can > > approve it as ivopts maintainer. > > > >> Thanks very much for your time! > > > > And thank you as well Bin :-) > > > > > > Segher > > > -- Richard Biener SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Felix Imendörffer; HRB 247165 (AG München)