From: Kazu Hirata Date: Thu, 26 Jun 2003 13:42:33 +0000 (+0000) Subject: postreload.c (reload_cse_simplify_set): Call cselib_lookup earlier. X-Git-Tag: releases/gcc-3.4.0~5451 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b2948a2caa8fefecc4c9baba198cacdf9609adc7;p=thirdparty%2Fgcc.git postreload.c (reload_cse_simplify_set): Call cselib_lookup earlier. * postreload.c (reload_cse_simplify_set): Call cselib_lookup earlier. Don't check if SRC is a constant. From-SVN: r68533 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ba5cd5bc1072..48334d73906f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-06-26 Kazu Hirata + + * postreload.c (reload_cse_simplify_set): Call cselib_lookup + earlier. Don't check if SRC is a constant. + 2003-06-26 Kazu Hirata * Makefile.in (OBJS): Add postreload.o. diff --git a/gcc/postreload.c b/gcc/postreload.c index 78153b64df01..1c53395be327 100644 --- a/gcc/postreload.c +++ b/gcc/postreload.c @@ -246,21 +246,19 @@ reload_cse_simplify_set (set, insn) return 0; #endif + val = cselib_lookup (src, GET_MODE (SET_DEST (set)), 0); + if (! val) + return 0; + /* If memory loads are cheaper than register copies, don't change them. */ if (GET_CODE (src) == MEM) old_cost = MEMORY_MOVE_COST (GET_MODE (src), dclass, 1); - else if (CONSTANT_P (src)) - old_cost = rtx_cost (src, SET); else if (GET_CODE (src) == REG) old_cost = REGISTER_MOVE_COST (GET_MODE (src), REGNO_REG_CLASS (REGNO (src)), dclass); else - /* ??? */ old_cost = rtx_cost (src, SET); - val = cselib_lookup (src, GET_MODE (SET_DEST (set)), 0); - if (! val) - return 0; for (l = val->locs; l; l = l->next) { rtx this_rtx = l->loc;