This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] PR54919 - fix variable expansion in RTL loop unrolling
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Eric Botcazou <ebotcazou at adacore dot com>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Sun, 14 Oct 2012 16:18:58 +0200
- Subject: Re: [patch] PR54919 - fix variable expansion in RTL loop unrolling
- References: <CABu31nP_8v8t1ZTtHJVKzq9hcuxqbRg5oFD00MjX5Dk775Egpw@mail.gmail.com>
> Hello,
>
> Today appears to be RTL loop optimizer patch day, because here's
> another patch...
>
> The problem here is that variable expansion does not update REG_EQUAL
> notes when it performs replacement of the renamed register.
Hehe. or rather REG_EQUAL patch day :)
It makes me wonder how much of the REG_EQUAL machinery we stil make good use of.
>
> I fixed this by using validate_replace_rtx_group(). There is already
> code in analyze_insn_to_expand_var() to make sure that the
> to-be-replaced register is only used to accumulate into, so I think
> that using validate_replace_rtx_group is safe. Could use a 2nd pair of
> eyes to make sure, though.
>
> Tested with a bootstrapped compiler. Test coverage isn't great,
> because variable expansion is not enabled by default.
Are there particular reasons to not enable it? It seems like usefull optimization.
Honza