This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: PATCH: PR gas/12049: Unnecessary relaxation


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.
>

This works.  Thanks.



-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]