[patch] Extend store merging to STRING_CST
Richard Biener
richard.guenther@gmail.com
Thu Jul 2 08:40:39 GMT 2020
On Wed, Jul 1, 2020 at 11:06 PM Eric Botcazou <botcazou@adacore.com> wrote:
>
> > Hmm, that's a good question - so would your patch be replaceable by
> > simply amending var_decl_component_p by
> >
> > (var_decl_component_p (TREE_OPERAND (src, 0))
> >
> > || TREE_CODE (TREE_OPERAND (src, 0)) == STRING_CST)
> >
> > ?
>
> The gimple_call_alloca_for_var_p (stmt) kludge is still needed though and the
> end of the transformation needs to be adjusted, so I'm not sure it's better.
Sorry for the ping-pong but why's using a new char[len] type problematic?
That said, I do like p2 more even if we need to special-case STRING_CST
sources at the end for store-merging to be happy.
Thanks,
Richard.
> --
> Eric Botcazou
More information about the Gcc-patches
mailing list