This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Simple Value Range Propagation


On Sun, Jun 08, 2003 at 10:20:33PM +0200, Josef Zlomek wrote:
> Hi,
> 
> this patch contains a simple Value Range Propagation.
> It tracks const -> reg and reg -> reg stores,
> and also branches, for example:
> 
> if (i > 0)
>    foo;		// i is in range [1,max_val] here
> else
>    bar;		// i is in range [min_val,0] here
> 
> It also deletes (more accuratelly let cleaup_cfg delete)
> code unreachable because of conditions, for example:
> 
> if (i < 0)
> {
>   if (i > 5)
>      delete_this;
> }
> 
> It takes 2% of compile time and adds 0.5 % overall performance on SPECint2000.
> 
> Bootstrapped/regtested x86-64.
> OK for mainline?

Is it really necessary to add new essentially high-level optimizers at
the RTL level?  This pass would be quite straightforward on tree-ssa.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]