home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,289 of 2,753   
   Diego Novillo to Chris Cox   
   Re: Looking for the name of an optimizat   
   31 Mar 08 21:16:37   
   
   From: dnovillo@acm.org   
      
   On Mon, Mar 31, 2008 at 8:36 PM, Chris Cox  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.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca