This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix PR middle-end/82569
- 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>
- Date: Mon, 23 Oct 2017 13:07:29 +0200
- Subject: Re: [patch] Fix PR middle-end/82569
- Authentication-results: sourceware.org; auth=none
- References: <6561954.cUVdaKEquF@polaris>
On Mon, Oct 23, 2017 at 12:57 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> Hi,
>
> this is the regression present on the mainline for Power6 and introduced by my
> patch fiddling with SUBREG_PROMOTED_VAR_P in expand_expr_real_1. It turns out
> that the ouf-of-ssa pass implicitly assumes that promoted RTXes for partitions
> are fully initialized (because it can generate direct moves in promoted mode)
> and clearing SUBREG_PROMOTED_VAR_P for some of them goes against this.
>
> Therefore the attached patch goes in the opposite direction and initializes
> the RTXes for problematic partitions on function entry. Surprisingly enough,
> this generates smaller code on average at -O2 for gcc.c-torture/compile:
>
> 49 files changed, 1243 insertions(+), 1694 deletions(-)
>
> probably because the compiler can now infer values on paths from entry where
> variables are uninitialized. Tested on PowerPC64/Linux, OK for the mainline?
Ok.
Thanks,
Richard.
>
> 2017-10-23 Eric Botcazou <ebotcazou@adacore.com>
>
> PR middle-end/82569
> * tree-outof-ssa.h (always_initialized_rtx_for_ssa_name_p): Delete.
> * expr.c (expand_expr_real_1) <expand_decl_rtl>: Revert latest change.
> * loop-iv.c (iv_get_reaching_def): Likewise.
> * cfgexpand.c (expand_one_ssa_partition): Initialize the RTX if the
> variable is promoted and the partition contains undefined values.
>
> --
> Eric Botcazou