Add overflow infinity handling to VRP

Mark Mitchell mark@codesourcery.com
Wed Jan 3 19:29:00 GMT 2007


Ian Lance Taylor wrote:

> Sure, I considered that.  I elected not to implement it that way
> because I believe it will make the code more complex and slower.  With
> the current implementation most operations slide through unchanged
> because of the known value of the infinity representation.  If we add
> additional fields, those fields will have to be checked and copied
> every time VRP examines a value range.
> 
> Since this is Diego's code, I'm willing to implement whichever
> approach seems better to him.

For what it's worth, I find the infinity approach more attractive.
(It's more like what happens with IEEE floating-point; once you get to
+inf, you generally are stuck there.)  I like the idea that TYPE_MAX
means "up to and including the biggest representable value" whereas INF
means "up to the biggest representable value, and maybe overflow".

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Gcc-patches mailing list