This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Handling non-constant bounds in extract_range_from_cond
- From: Laurent GUERBY <laurent at guerby dot net>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 30 Nov 2004 00:23:26 +0100
- Subject: Re: Handling non-constant bounds in extract_range_from_cond
- References: <10411292320.AA02477@vlsi1.ultra.nyu.edu>
On Tue, 2004-11-30 at 00:20, Richard Kenner wrote:
> I don't mind the compiler being friendler for "X in Foo" (but then I
> assume some users may complain about performance so you'll have to add
> a switch to restore the more formal standard behaviour)
>
> I don't follow. Treating "X in Foo" as X'Valid is perfectly
> standard-conforming.
But this transformation is a performance loss if the expression can be
proved true by the compiler or if one of the two bound checks
can be omitted due to compiler knowledge. Hence a flag
for those who know the standard to suppress this transformation.
(I'm assuming X'Valid means no optimization at all as expected
by the standard).
Laurent