This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Simple Value Range Propagation
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Josef Zlomek <zlomj9am at artax dot karlin dot mff dot cuni dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 8 Jun 2003 16:28:17 -0400
- Subject: Re: Simple Value Range Propagation
- References: <20030608202033.GD28080@artax.karlin.mff.cuni.cz>
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