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: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: stevenb at suse dot de
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 13 Sep 04 13:47:34 EDT
- Subject: Re: [PATCH] Handle read-only vars initialized to string literals in c_strlen
> 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.
It's checking for a constant. I agree it should be exposed as early
as possible, but the routine that checks for it should be as low as possible
so that as many callers of it will see it.