Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Compilers > Re: Looking for...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 4 Topic 2376 of 2474
Post > Topic >>

Re: Looking for the name of an optimization

by "Diego Novillo" <dnovillo@[EMAIL PROTECTED] > Mar 31, 2008 at 09:16 PM

On Mon, Mar 31, 2008 at 8:36 PM, Chris Cox <ccox@[EMAIL PROTECTED]
> wrote:

>     if (x == 1 && y == 2)
>         z = 300 / (x + y)
>  ==>
>     if (x == 1 && y == 2)
>         z = 100

In GCC we call it VRP, value range propagation.

It falls out of the singularity that happens when you have ranges
where min == max:  In this case, inside the then clause of that if(),
the range for x is [1, 1], the range for y is [2, 2].  After
propagation, GCC substitutes x with 1, y with 2 and the folders do the
rest.


Diego.
 




 4 Posts in Topic:
Looking for the name of an optimization
Chris Cox <ccox@[EMAIL  2008-03-31 17:36:27 
Re: Looking for the name of an optimization
"Diego Novillo"  2008-03-31 21:16:37 
Re: Looking for the name of an optimization
Chris F Clark <cfc@[EM  2008-04-02 11:39:14 
Re: Looking for the name of an optimization
andreybokhanko@[EMAIL PRO  2008-04-13 11:14:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 1:21:35 CDT 2008.