Fixing another missed optimization opportunity in VRP

Laurent GUERBY laurent@guerby.net
Sun Jan 22 14:06:00 GMT 2006


FYI, this patch causes PR ada/25900.

Laurent

On Thu, 2006-01-19 at 09:30 -0700, Jeffrey A Law wrote:
> When extracting a range from an ASSERT_EXPR, we have the opportunity to
> to refine the resulting range if the variable referenced by the
> ASSERT_EXPR already has range information.  ie, we have a case where the
> resulting range is the intersection of the existing range as the new
> ASSERT_EXPR's range.
> 
> We properly handle the case where the previous range and the range
> generated by the ASSERT_EXPR are both VR_RANGEs; however we did not
> handle the case where one of them is a VR_ANTI_RANGE.
> 
> Failure to handle the case where one is a VR_ANTI_RANGE results in
> computing ranges that, while conservatively correct, are too large
> and ultimately can result in missing opportunities to either simplify
> or totally eliminate conditionals as can be seen by vrp25.c, which
> was extracted from GCC sources.
> 
> This patch fixes that omission and has been bootstrapped and regression
> tested on i686-pc-linux-gnu.




More information about the Gcc-patches mailing list