This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix PR tree-optimization/70884
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, alan dot lawrence at arm dot com
- Date: Mon, 9 May 2016 12:01:57 +0200
- Subject: Re: [patch] Fix PR tree-optimization/70884
- Authentication-results: sourceware.org; auth=none
- References: <6226269 dot FBBDIS7nhY at polaris>
On Sat, May 7, 2016 at 11:22 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> Hi,
>
> this is a tentative fix for the regression introduced in SRA by the machinery
> which deals with the constant pool. initialize_constant_pool_replacements is
> supposed to issues new loads from the pool for scalarized variables, but it
> fails to do so for variables that are only partially scalarized.
>
> Tested on PowerPC/Linux and x86-64/Linux, OK for mainline and 6 branch?
Hmm, the patch looks obvious if it was the intent to allow constant
pool replacements
_not_ only when the whole constant pool entry may go away. But I
think the intent was
to not do this otherwise it will generate worse code by forcing all
loads from the constant pool to appear at
function start.
So - the "real" issue may be a missing
should_scalarize_away_bitmap/cannot_scalarize_away_bitmap
check somewhere.
Alan?
Thanks,
Richrd.
>
> 2016-05-07 Eric Botcazou <ebotcazou@adacore.com>
>
> PR tree-optimization/70884
> * tree-sra.c (initialize_constant_pool_replacements): Process all the
> candidate variables.
>
>
> 2016-05-07 Eric Botcazou <ebotcazou@adacore.com>
>
> * gcc.dg/pr70884.c: New test.
>
> --
> Eric Botcazou