On Fri, 2013-05-03 at 13:58 -0700, H.J. Lu wrote: > On Fri, Mar 29, 2013 at 2:15 PM, Bill Schmidt > <wschm...@linux.vnet.ibm.com> wrote: > > This is a resubmission of a patch I sent to the list last August, > > re-based for the C++ changes since then. It implements the last big > > chunk of straight-line strength reduction (conditional candidates, for > > cases like comment 2 in PR35308). > > > > I was pulled off of GCC to another project with a tight deadline and > > wasn't able to shepherd the patch through last year. Now at last I > > have a little more time to get this wrapped up. > > > > Bootstrapped and tested on powerpc64-unknown-linux-gnu with no > > regressions. Thanks in advance for your review! > > > > Bill > > > > > > gcc: > > > > 2013-03-29 Bill Schmidt <wschm...@linux.vnet.ibm.com> > > > > * gimple-ssa-strength-reduction.c (cand_kind): Add CAND_PHI. > > (slsr_cand_d): Redefine def_phi. > > (stride_status, phi_adjust_status, count_phis_status): New enums. > > (find_phi_def): New. > > (find_basis_for_base_expr): New. > > (find_basis_for_candidate): Handle hidden bases. > > (alloc_cand_and_find_basis): Handle phi candidates. > > (slsr_process_phi): New. > > (create_mul_ssa_cand): Exclude phi base candidates. > > (create_mul_imm_cand): Likewise. > > (create_add_ssa_cand): Likewise. > > (create_add_imm_cand): Likewise. > > (slsr_process_cast): Likewise. > > (slsr_process_copy): Likewise. > > (find_candidates_in_block): Handle phi candidates. > > (dump_candidate): Likewise. > > (unconditional_cands): Delete. > > (unconditional_cands_with_known_stride_p): Delete. > > (phi_dependent_cand_p): New. > > (cand_increment): Handle phi-dependent candidates. > > (replace_dependent): Delete. > > (replace_mult_candidate): New. > > (replace_unconditional_candidate): New. > > (incr_vec_index): Move to avoid forward reference. > > (create_add_on_incoming_edge): New. > > (create_phi_basis): New. > > (replace_dependents): Delete. > > (replace_conditional_candidate): New. > > (phi_add_costs): New. > > (replace_uncond_cands_and_profitable_phis): New. > > (record_increment): Handle phi adjustments. > > (record_phi_increments): New. > > (record_increments): Handle phi adjustments. > > (phi_incr_cost): New. > > (lowest_cost_path): Handle phis. > > (total_savings): Likewise. > > (ncd_with_phi): New. > > (ncd_of_cand_and_phis): New. > > (nearest_common_dominator_for_cands): Handle phi increments. > > (all_phi_incrs_profitable): New. > > (replace_profitable_candidates): Handle phi-dependent candidates. > > (analyze_candidates_and_replace): Likewise. > > > > This breaks bootstrap on x86: > > http://gcc.gnu.org/ml/gcc-regression/2013-05/msg00049.html
Confirmed. It looks a bit complex to sort out, so I'll test a workaround to disable conditional candidate processing and commit that shortly. Thanks, Bill > > -- > H.J. >