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


> > 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.

I agree that it is better to do it on tree-ssa. But I think it is useful
on RTL level too. Some more optimizations may be written by using it and
maybe we could use it for branch predictions too.

Josef


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