X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Flambda-code.c;h=cf995a3f9f41df4131b00acb2837c07e2b4576d2;hb=b78b6a05dc7a9bcf4c6c93f994f4c5f70b968172;hp=6dbbe6d8b8bdf8c3f1142a1929c2e69d3528dbca;hpb=6126d87b1e8d94fca5687dd339fefc6f3b8b42ee;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/lambda-code.c b/gcc/lambda-code.c index 6dbbe6d8b8b..cf995a3f9f4 100644 --- a/gcc/lambda-code.c +++ b/gcc/lambda-code.c @@ -16,8 +16,8 @@ You should have received a copy of the GNU General Public License along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA. */ #include "config.h" #include "system.h" @@ -1592,7 +1592,7 @@ lbv_to_gcc_expression (lambda_body_vector lbv, /* newname = coefficient * induction_variable */ coeffmult = build_int_cst (type, LBV_COEFFICIENTS (lbv)[i]); stmt = build (MODIFY_EXPR, void_type_node, resvar, - fold (build (MULT_EXPR, type, iv, coeffmult))); + fold_build2 (MULT_EXPR, type, iv, coeffmult)); newname = make_ssa_name (resvar, stmt); TREE_OPERAND (stmt, 0) = newname; @@ -1694,7 +1694,7 @@ lle_to_gcc_expression (lambda_linear_expression lle, { coeff = build_int_cst (type, LLE_COEFFICIENTS (lle)[i]); - mult = fold (build (MULT_EXPR, type, iv, coeff)); + mult = fold_build2 (MULT_EXPR, type, iv, coeff); } /* newname = mult */ @@ -1735,7 +1735,7 @@ lle_to_gcc_expression (lambda_linear_expression lle, else { coeff = build_int_cst (type, invcoeff); - mult = fold (build (MULT_EXPR, type, invar, coeff)); + mult = fold_build2 (MULT_EXPR, type, invar, coeff); } /* newname = mult */ @@ -2010,27 +2010,6 @@ lambda_loopnest_to_gcc_loopnest (struct loop *old_loopnest, VEC_free (tree, heap, new_ivs); } -/* Returns true when the vector V is lexicographically positive, in - other words, when the first nonzero element is positive. */ - -static bool -lambda_vector_lexico_pos (lambda_vector v, - unsigned n) -{ - unsigned i; - for (i = 0; i < n; i++) - { - if (v[i] == 0) - continue; - if (v[i] < 0) - return false; - if (v[i] > 0) - return true; - } - return true; -} - - /* Return TRUE if this is not interesting statement from the perspective of determining if we have a perfect loop nest. */ @@ -2184,7 +2163,9 @@ replace_uses_equiv_to_x_with_y (struct loop *loop, tree stmt, tree x, (loop, analyze_scalar_evolution (loop, use)); if (access_fn != NULL_TREE && access_fn != chrec_dont_know) step = evolution_part_in_loop_num (access_fn, loop->num); - if ((step && step != chrec_dont_know && int_cst_value (step) == xstep) + if ((step && step != chrec_dont_know + && TREE_CODE (step) == INTEGER_CST + && int_cst_value (step) == xstep) || USE_FROM_PTR (use_p) == x) SET_USE (use_p, y); }