This is the mail archive of the
mailing list for the GCC project.
Re: Handling non-constant bounds in extract_range_from_cond
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: laurent at guerby dot net
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 29 Nov 04 17:19:50 EST
- Subject: Re: Handling non-constant bounds in extract_range_from_cond
Why not replace 'Valid by a function call, with the
body unknown to the optimizer (unoptimizable/inlinable/whatever)?
R := X'Valid
R := Check_Valid(X,bound information)
-- and make sure the compiler cannot know anything about Check_Valid
-- at the point of the call and is forced to generate a call
May be there's no way to say that about a function to the backend.
Another possibility to add some backend representation
of "don't assume anything about this value":
R := (no_information(X))'Valid
Somehow I just don't like the idea of purposely generating something
for the sole purpose of not allowing an optimizer to see it. It's
indeed possible, but it seems like overkill to me for an optimization
that's not likely to be all that useful.
And, as a programmer, what do you think about the "X in Foo" operation?
Would you expect that to be the same as X'Valid or would you be
comfortable viewing that as a bounded error?