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: [PATCH] PR gold/17640


On Thu, Feb 19, 2015 at 6:27 AM, Ilya Tocar <tocarip.intel@gmail.com> wrote:
> On 18 Feb 07:48, H.J. Lu wrote:
>> On Wed, Feb 18, 2015 at 7:00 AM, Ilya Tocar <tocarip.intel@gmail.com> wrote:
>> > On 02 Feb 06:41, H.J. Lu wrote:
>> >> On Mon, Feb 2, 2015 at 5:47 AM, Ilya Tocar <tocarip.intel@gmail.com> wrote:
>> >> > Hi,
>> >> >
>> >> > This patch adds mov to lea conversion to gold (as discussed in PR).
>> >> > It provides about 1.5% performance gain on SPEC2000 geomean,
>> >> > when pie is used.
>> >> > OK for trunk?
>> >>
>> >> The patch is incomplete.  Gold generates a useless R_386_RELATIVE
>> >> relocation together with an unused GOT slot:
>> >>
>> >
>> > I've tried to implement this, however I've encountered some difficulties.
>> > It looks like not creating got slots/relocation in
>> > Target_i386::Scan::local for  R_386_GOT32 (that will be converted to
>> > R_386_GOTOFF later) is the right approach.
>> > However in Scan::local we don't have access to corresponding view, and so we are
>> > unable to check wether we are dealing with mov (which can be optimized),
>> > or something else.
>> > Can you provide some advice on how to check for mov's in scan?
>>
>> Can you add access to view in Scan::local?
>>
> Scan::local is called from gold::scan_relocs, so passing view into it
> will require changes in other targets, which I'd like to avoid.
> Also I'm not sure how to get view into instruction that uses
> corresponding relocation.

Gold will fail some TLS testcases in ld, like the ones in

https://sourceware.org/ml/binutils/2007-08/msg00353.html

Target_i386::optimize_tls_reloc should check TLS instruction sequence,
similar to elf_i386_check_tls_transition.  To do that, you need view.  You
can add it and update other targets.


H.J.


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