This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] PR gold/17640
- From: Ilya Tocar <tocarip dot intel at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Cary Coutant <ccoutant at google dot com>, Ian Lance Taylor <iant at google dot com>, Binutils <binutils at sourceware dot org>
- Date: Thu, 19 Feb 2015 17:27:07 +0300
- Subject: Re: [PATCH] PR gold/17640
- Authentication-results: sourceware.org; auth=none
- References: <20150202134701 dot GA91020 at msticlxl7 dot ims dot intel dot com> <CAMe9rOpzSBoiykoFG+YuAK8QYsguqzZNrvj2sE7EhafUzOjJJw at mail dot gmail dot com> <20150218150011 dot GA40373 at msticlxl7 dot ims dot intel dot com> <CAMe9rOqGecgvSMs937a2b57mGjp-ZF5XuULQoAx3Tr9NG75GcA at mail dot gmail dot com>
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.