diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-09 08:45:21 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-09-09 08:45:21 +0000 |
commit | d643dd7ea8fb97e4347703e8711311fca913ec19 (patch) | |
tree | 0a5c30ced0389a2e395fdf18fe927e3da06fdbe9 /gcc/loop.c | |
parent | 1f0ce6a64a8a8f3bc73c7510159a3455510beec9 (diff) | |
download | gcc-d643dd7ea8fb97e4347703e8711311fca913ec19.tar.gz |
* loop.c (combine_givs): Fix computing of benefit once giv is combined.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45494 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop.c')
-rw-r--r-- | gcc/loop.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/loop.c b/gcc/loop.c index 990826a5a7d..ef1b7ee3ea8 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -6851,6 +6851,13 @@ restart: g2->new_reg = can_combine[i * giv_count + j]; g2->same = g1; + /* For destination, we now may replace by mem expression instead + of register. This changes the costs considerably, so add the + compensation. */ + if (g2->giv_type == DEST_ADDR) + g2->benefit = (g2->benefit + reg_address_cost + - address_cost (g2->new_reg, + GET_MODE (g2->mem))); g1->combined_with++; g1->lifetime += g2->lifetime; |