This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR tree-optimization/65002] Disable SRA for functions wrongly marked as read-only
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: Ilya Enkovich <enkovich dot gnu at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 13 Feb 2015 20:25:19 +0100
- Subject: Re: [PATCH, PR tree-optimization/65002] Disable SRA for functions wrongly marked as read-only
- Authentication-results: sourceware.org; auth=none
- References: <20150212141419 dot GA35812 at msticlxl57 dot ims dot intel dot com> <20150213191952 dot GE23138 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Feb 13, 2015 at 08:19:52PM +0100, Marek Polacek wrote:
> On Thu, Feb 12, 2015 at 05:14:19PM +0300, Ilya Enkovich wrote:
> > Hi,
> >
> > PR65002 is the second issue caused by SRA for functions wrongly marked as read-only. Previous fix for PR64353 doesn't work for this case because SSA update happens too late. Here is a patch to disable SRA for such functions to avoid inconsistent SSA issues.
> >
> > Bootstrapped and tested on x86_64-unknown-linux-gnu. OK for trunk?
> >
> > Thanks,
> > Ilya
> > --
> > gcc/
> >
> > 2015-02-12 Ilya Enkovich <ilya.enkovich@intel.com>
> >
> > PR tree-optimization/65002
> > * tree-cfg.c (pass_data_fixup_cfg): Don't update
> > SSA on start.
> > * tree-sra.c (some_callers_have_no_vuse_p): New.
> > (ipa_early_sra): Reject functions whose callers
> > assume funciton is read only.
> >
> > gcc/testsuite/
> >
> > 2015-02-12 Ilya Enkovich <ilya.enkovich@intel.com>
> >
> > PR tree-optimization/65002
> > * gcc.dg/pr65002.C: New.
>
> This test should have gone into g++.dg.
Into g++.dg/opt or g++.dg/ipa in particular.
Jakub