RFC: PATCH: PR gas/12049: Unnecessary relaxation
H.J. Lu
hjl.tools@gmail.com
Fri Oct 22 19:44:00 GMT 2010
On Tue, Oct 19, 2010 at 4:59 AM, Alan Modra <amodra@gmail.com> wrote:
> On Mon, Oct 18, 2010 at 10:51:32AM -0700, H.J. Lu wrote:
>> I tried it on gcc trunk at revision 165633 with i686-linux:
>
> Timing gcc bootstrap and regression testing isn't particularly
> convincing, since the assembler time is likely only a small part of
> the total.
>
> If you take a look at the history of this code, you'll find
> http://sourceware.org/ml/binutils/2001-02/msg00320.html. In that
> patch, Ian considerably reduced the time in gas by minimizing (a
> little too enthusiastically) the cases we did a scan over frags for
> each rs_machine_dependent frag. You might understand why I'd rather
> not go back to doing that again. In fact, the more I look at your
> patch, the less I like it. You're using code that initializes frag
> addresses to update addresses?? That would reset branches, leb128
> etc. to their initial sizes! Also, you only need to traverse frags
> until you find the symbol frag, not update all of them.
>
> I think the following is a much better solution.
>
> PR gas/12049
> * frags.h (struct frag): Add "region" field.
> * write.c (relax_frag): Don't add "stretch" to forward reference
> target if there is an intervening org or align.
> (relax_segment): Set region.
>
Hi Alan,
Your fix doesn't handle the new testcase in
http://sourceware.org/bugzilla/show_bug.cgi?id=12049
H.J.
More information about the Binutils
mailing list