diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2003-06-26 13:42:33 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2003-06-26 13:42:33 +0000 |
commit | b2948a2caa8fefecc4c9baba198cacdf9609adc7 (patch) | |
tree | 12edef829212a7704e1711b29fc827c2a2a42992 | |
parent | 15e35479ebbb6b462f01b0f0330c2398089a33ed (diff) | |
download | gcc-b2948a2caa8fefecc4c9baba198cacdf9609adc7.zip gcc-b2948a2caa8fefecc4c9baba198cacdf9609adc7.tar.gz gcc-b2948a2caa8fefecc4c9baba198cacdf9609adc7.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/postreload.c | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ba5cd5b..48334d7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2003-06-26 Kazu Hirata <kazu@cs.umass.edu> + * postreload.c (reload_cse_simplify_set): Call cselib_lookup + earlier. Don't check if SRC is a constant. + +2003-06-26 Kazu Hirata <kazu@cs.umass.edu> + * Makefile.in (OBJS): Add postreload.o. Remove cselib.h from the dependency list for reload1.o. Add a dependency list for postreload.o. diff --git a/gcc/postreload.c b/gcc/postreload.c index 78153b6..1c53395 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; |