From 5b3d5f769bef7b9a8b43fc8269c14b56ad3be465 Mon Sep 17 00:00:00 2001 From: Bill Schmidt Date: Mon, 18 Jan 2016 02:43:06 +0000 Subject: [PATCH] re PR tree-optimization/68799 (lto ICE on powerpc64le-linux-gnu builing python 2.7.x) 2016-01-17 Bill Schmidt PR tree-optimization/68799 * gimple-ssa-strength-reduction.c (create_phi_basis): Directly look up phi candidates in the statement-candidate map. (phi_add_costs): Likewise. (record_phi_increments): Likewise. (phi_incr_cost): Likewise. (ncd_with_phi): Likewise. (all_phi_incrs_profitable): Likewise. From-SVN: r232491 --- gcc/ChangeLog | 11 +++++++++++ gcc/gimple-ssa-strength-reduction.c | 12 ++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5a5d45b..8a1839e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2016-01-17 Bill Schmidt + + PR tree-optimization/68799 + * gimple-ssa-strength-reduction.c (create_phi_basis): Directly + look up phi candidates in the statement-candidate map. + (phi_add_costs): Likewise. + (record_phi_increments): Likewise. + (phi_incr_cost): Likewise. + (ncd_with_phi): Likewise. + (all_phi_incrs_profitable): Likewise. + 2016-01-17 Jakub Jelinek * omp-low.c (mark_loops_in_oacc_kernels_region): Work around diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c index 24f9b27..46ee7a7 100644 --- a/gcc/gimple-ssa-strength-reduction.c +++ b/gcc/gimple-ssa-strength-reduction.c @@ -2230,7 +2230,7 @@ create_phi_basis (slsr_cand_t c, gimple *from_phi, tree basis_name, slsr_cand_t basis = lookup_cand (c->basis); int nargs = gimple_phi_num_args (from_phi); basic_block phi_bb = gimple_bb (from_phi); - slsr_cand_t phi_cand = base_cand_from_table (gimple_phi_result (from_phi)); + slsr_cand_t phi_cand = *stmt_cand_map->get (from_phi); auto_vec phi_args (nargs); /* Process each argument of the existing phi that represents @@ -2339,7 +2339,7 @@ phi_add_costs (gimple *phi, slsr_cand_t c, int one_add_cost) { unsigned i; int cost = 0; - slsr_cand_t phi_cand = base_cand_from_table (gimple_phi_result (phi)); + slsr_cand_t phi_cand = *stmt_cand_map->get (phi); /* If we work our way back to a phi that isn't dominated by the hidden basis, this isn't a candidate for replacement. Indicate this by @@ -2550,7 +2550,7 @@ static void record_phi_increments (slsr_cand_t basis, gimple *phi) { unsigned i; - slsr_cand_t phi_cand = base_cand_from_table (gimple_phi_result (phi)); + slsr_cand_t phi_cand = *stmt_cand_map->get (phi); for (i = 0; i < gimple_phi_num_args (phi); i++) { @@ -2622,7 +2622,7 @@ phi_incr_cost (slsr_cand_t c, const widest_int &incr, gimple *phi, unsigned i; int cost = 0; slsr_cand_t basis = lookup_cand (c->basis); - slsr_cand_t phi_cand = base_cand_from_table (gimple_phi_result (phi)); + slsr_cand_t phi_cand = *stmt_cand_map->get (phi); for (i = 0; i < gimple_phi_num_args (phi); i++) { @@ -2966,7 +2966,7 @@ ncd_with_phi (slsr_cand_t c, const widest_int &incr, gphi *phi, { unsigned i; slsr_cand_t basis = lookup_cand (c->basis); - slsr_cand_t phi_cand = base_cand_from_table (gimple_phi_result (phi)); + slsr_cand_t phi_cand = *stmt_cand_map->get (phi); for (i = 0; i < gimple_phi_num_args (phi); i++) { @@ -3176,7 +3176,7 @@ all_phi_incrs_profitable (slsr_cand_t c, gimple *phi) { unsigned i; slsr_cand_t basis = lookup_cand (c->basis); - slsr_cand_t phi_cand = base_cand_from_table (gimple_phi_result (phi)); + slsr_cand_t phi_cand = *stmt_cand_map->get (phi); for (i = 0; i < gimple_phi_num_args (phi); i++) { -- 2.7.4