This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [RFC: Patch, PR 60158] gcc/varasm.c : Pass actual alignment value to output_constant_pool_2
- From: Richard Biener <rguenther at suse dot de>
- To: Dharmakan Rohit Arul Raj <rohitarulraj at freescale dot com>
- Cc: Jeff Law <law at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>, Alan Modra <amodra at gmail dot com>, David Edelsohn <dje dot gcc at gmail dot com>, Edmar Wienskoski <edmar at freescale dot com>
- Date: Tue, 26 May 2015 10:20:00 +0200 (CEST)
- Subject: RE: [RFC: Patch, PR 60158] gcc/varasm.c : Pass actual alignment value to output_constant_pool_2
- Authentication-results: sourceware.org; auth=none
- References: <BLUPR03MB14584D4240675B763002EA5FC2090 at BLUPR03MB1458 dot namprd03 dot prod dot outlook dot com> <BLUPR03MB1458002E9FF7B37BD72093E5C2E80 at BLUPR03MB1458 dot namprd03 dot prod dot outlook dot com> <553FCEC6 dot 8030609 at redhat dot com> <BLUPR03MB14580D7A857EC224F78FCBAFC2E80 at BLUPR03MB1458 dot namprd03 dot prod dot outlook dot com> <55400A0E dot 5010601 at redhat dot com> <BLUPR03MB14580146D1439BC971C101C9C2D70 at BLUPR03MB1458 dot namprd03 dot prod dot outlook dot com> <554243E9 dot 6030206 at redhat dot com> <BLUPR03MB145836E6EB004693009F17EAC2D60 at BLUPR03MB1458 dot namprd03 dot prod dot outlook dot com> <55424DC9 dot 5020303 at redhat dot com> <BLUPR03MB1458C208112FCA605CF65F26C2D10 at BLUPR03MB1458 dot namprd03 dot prod dot outlook dot com> <55557D4C dot 9010500 at redhat dot com> <BLUPR03MB1458F5EE315C61519E4E8B1AC2C70 at BLUPR03MB1458 dot namprd03 dot prod dot outlook dot com> <55562E64 dot 2040009 at redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1505180935240 dot 18702 at zhemvz dot fhfr dot qr> <BLUPR03MB14583EA80C7D4927DE7CFE96C2CD0 at BLUPR03MB1458 dot namprd03 dot prod dot outlook dot com>
On Mon, 25 May 2015, Dharmakan Rohit Arul Raj wrote:
> > -----Original Message-----
> > From: Richard Biener [mailto:rguenther@suse.de]
> > Sent: Monday, May 18, 2015 1:06 PM
> > To: Jeff Law
> > Cc: Dharmakan Rohit-B30502; gcc-patches@gcc.gnu.org; Jakub Jelinek; Alan
> > Modra; David Edelsohn; Wienskoski Edmar-RA8797
> > Subject: Re: [RFC: Patch, PR 60158] gcc/varasm.c : Pass actual alignment value
> > to output_constant_pool_2
> >
> > On Fri, 15 May 2015, Jeff Law wrote:
> >
> > > On 05/15/2015 04:37 AM, Dharmakan Rohit Arul Raj wrote:
> > > >
> > > > > -----Original Message-----
> > > > > From: Jeff Law [mailto:law@redhat.com]
> > > > > Sent: Friday, May 15, 2015 10:30 AM
> > > > > > Just to summarize: By default in GCC v4.7.x, all the constants
> > > > > > are put into '.rodata.str1.4' section. In GCC v4.8.x from
> > > > > > r192719 onwards, one of the move instruction of the string
> > > > > > constant ".LC0" is getting spilled. The reload pass, for any
> > > > > > constants that aren't allowed and can't be reloaded in to
> > > > > > registers tries to change them into memory references. Then
> > > > > > while emitting that string constant to asm code
> > > > > > (A:varasm.c: output_constant_pool_1), it explicitly passes the
> > > > > > alignment as 1 which prevents the generation of fix-up table
> > > > > > entries in 'B: rs6000.c:rs6000_assemble_integer' because the
> > > > > > data is considered unaligned now.
> > > > > >
> > > > > > The bug seems to have gone latent with an unrelated trunk commit
> > > > > > r204695 [* tree-ssa-loop-ivopts.c (force_expr_to_var_cost):
> > > > > > Refactor the code. Handle type conversion.]. This commit chooses
> > > > > > different spill candidates hence all the string constants are
> > > > > > being put in to '.rodata.str1.4Âsection.
> > > > > >
> > > > > > The check I had in the test case is that if there is a
> > > > > > '.data.rel.ro.local', then there should be '.fixup' section generated.
> > > > > >
> > > > > > Please let me know if you need any other details.
> > > > > Thanks. Even though I wasn't able to trigger the bug with the
> > > > > testcase from 65018, I went ahead and committed this patch to the
> > > > > trunk. It can't hurt and it's the right thing to do.
> > > > >
> > > > > Thanks for your patience,
> > > > >
> > > >
> > > > Jeff, Thanks for checking-in the changes.
> > > > Can we apply the patch to GCC v4.8 and GCC v4.9 branch as well?
> > > That's up to the branch maintainers. I'd think it's safe, but it's
> > > ultimately their call.
> >
> > If it's a regression or a wrong-code issue then it's ok to backport given the
> > patch is safe, of course.
>
> Just to confirm, can we backport the patch to GCC v4.8 & GCC v4.9 branch?
I've already said what I had to say. I didn't look at the patch.
Richard.