This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Handle read-only vars initialized to string literals in c_strlen
- From: Steven Bosscher <stevenb at suse dot de>
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 13 Sep 2004 19:37:17 +0200
- Subject: Re: [PATCH] Handle read-only vars initialized to string literals in c_strlen
- Organization: SUSE Labs
- References: <10409131738.AA08939@vlsi1.ultra.nyu.edu>
On Monday 13 September 2004 19:38, Richard Kenner wrote:
> On Monday 13 September 2004 18:16, Jakub Jelinek wrote:
> > * expr.c (string_constant): Handle also read-only variables
> > initialized to string literals.
>
> Please don't add this here, add it in the tree optimizers instead.
>
> Why? It seems to me that the lower-level we do such a check, the better.
It is not a check, it is constant folding. The higher-level we
expose constants, the better.
Gr.
Steven