Wrap calculation of PIC address into a single instruction

Steven Bosscher stevenb.gcc@gmail.com
Wed Jun 23 21:41:00 GMT 2010


On Wed, Jun 23, 2010 at 11:19 PM, Maxim Kuvyrkov <maxim@codesourcery.com> wrote:
> This patch enables optimizations, particularly GCSE, handle calculation of
> PIC addresses.  GCSE tracks only single instructions, so it can't handle
> two-instruction calculation of PIC address.
>
> With this patch, calculations of PIC addresses are represented as single
> instructions allowing GCSE eliminate all but the first address calculation
> for global variables.
>
> Any comments?

Yes. This is what we added GCSE's ability to eliminate redundancies
from REG_EQUAL notes for. If your PIC addresses have a REG_EQUAL note,
GCSE is (or should be) already able to eliminate redundant address
calculations.

Ciao!
Steven



More information about the Gcc-patches mailing list