This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] fix address_cost for x86
- From: "Uros Bizjak" <ubizjak at gmail dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Cc: "Zdenek Dvorak" <rakdver at kam dot mff dot cuni dot cz>
- Date: Wed, 4 Jul 2007 14:18:47 +0200
- Subject: Re: [patch] fix address_cost for x86
Hello!
ix86_address_cost considers offsetted addressing modes cheaper than
the modes without offset. Ivopts thus try to introduce offsets to addresses
whenever it is possible, even in cases it does not give any gain.
This may result in larger code, or losing debug information (PR 32445).
* config/i386/i386.c (ix86_address_cost): Do not consider more complex
addressing modes cheaper.
Does this patch also fix PR 24669 and two PRs that it blocks?
BTW: Some time ago, I have played with address_cost on x86 (trying to
fix PR 24669), but by changing the costs there, access to symbols
regressed badly - gcc didn't produce [ref + offset] addressing, but
ony reg = ref + offset; [reg] indirect sequences. Have you checked
this issue with your patch?
Thanks,
Uros.