This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: i386 code label alignment patch
- To: john at feith dot com (John Wehle)
- Subject: Re: i386 code label alignment patch
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 06 May 1998 20:06:14 -0600
- cc: egcs-bugs at cygnus dot com, wilson at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199805041430.KAA22226@jwlab.FEITH.COM>you write:
> Hello,
>
> This change implements the alignment of code labels following
> the recommendations of the "Intel Architecture Optimization Manual".
> This change seem to be worth about 33% speed increase in the simple
> case of:
>
> main()
> {
> int a;
> int i;
>
> a = 0;
> for (i = 0; i < 1000000000; i++)
> a += i;
>
> return a;
> }
I like the idea. However...
I don't think you can use an autoconf test like that -- what happens
for a cross or canadian cross build? It doesn't look like you handle
those cases. Then again, I'm not an autoconf guru, so I could be
missing something simple.
Maybe the way to go is make worst case assumptions in those cases.
Thoughts?
I also don't see why we need new output routines for
ASM_OUTPUT_LABEL_ALIGN_AFTER_BARRIER. Isn't the desired alignment
for each label stored in LABEL_TO_ALIGNMENT? Can you say more about
the motivation behind this aspect of the change
I also worry about the correctness of shorten_branches in the case
where the label is far away from the jump site and thus the alignment
directive has no effect. This may cause problems since shorten_branches
no longer uses trivial algorithms that either only grow or only shrink.
jeff