This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PR19039 causes regression of 3.9% in SPEC int
- From: Jeffrey A Law <law at redhat dot com>
- To: Steven Bosscher <stevenb at suse dot de>
- Cc: Roger Sayle <roger at eyesopen dot com>, Mostafa Hagog <MUSTAFA at il dot ibm dot com>, pinskia at physics dot uc dot edu, gcc at gcc dot gnu dot org
- Date: Mon, 27 Dec 2004 15:55:06 -0700
- Subject: Re: PR19039 causes regression of 3.9% in SPEC int
- Organization: Red Hat, Inc
- References: <Pine.LNX.4.44.0412240256330.24989-100000@www.eyesopen.com> <200412241426.29440.stevenb@suse.de>
- Reply-to: law at redhat dot com
On Fri, 2004-12-24 at 14:26 +0100, Steven Bosscher wrote:
> On Friday 24 December 2004 11:02, Roger Sayle wrote:
> > On Fri, 24 Dec 2004, Mostafa Hagog wrote:
> > > Performing the loop-header-copying is a sort of "work around" to this PR,
> > > I have ported the loop-header-copying from tree's to RTL. This caused a
> > > total 3.9% improvements with the rtl loop header copying (lhc).
> >
> > That's PR tree-optimization/19038, *not* PR target/19039.
>
> http://gcc.gnu.org/PR19038 for the quick link lovers.
Thanks. That helps.
> > Would you mind posting your RTL-based loop header copying patch to
> > gcc-patches? Not only might it be catching more optimizations than
> > out-of-ssa is causing, but as a solution it might be more suitable
> > for gcc 4.0 (depending upon compile-time performance impact, ugliness,
> > intrusivenss, corrections to Andrew's "quick fix", etc...).
>
> I'm unimpressed by either RTL loop header copying, or Andrew's fix,
> both just paper over the underlying problem. The real problem is
> that apparently we are creating a situation where copy propagation
> makes coalescing impossible. Fix that and you don't get the extra
> basic block - bug fixed, done.
Err, no.
The underlying problem is that the out-of-ssa coalescing code is simply
ignoring the coalescing opportunity because there is only one partition
associated with the temp1 variable. This is a compile-time memory
saving optimization. I'm pretty sure all we need to do is make the
code which compacts the map a little more intelligent to expose the
coalescing opportunity and all the right things will happen.
Handcuffing the copy propagation code isn't the solution. Fixing the
coalescing code is the right way to go.
Jeff