This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Handling non-constant bounds in extract_range_from_cond


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]