[patch] Fix PR44483: incrementally gimplify BB predicates to avoid redundant computations.

Richard Guenther rguenther@suse.de
Fri Jun 11 09:32:00 GMT 2010


On Thu, 10 Jun 2010, Sebastian Pop wrote:

> Hi,
> 
> The attached patch fixes PR44483 by early gimplifying the expressions
> that are used in the predicates of basic blocks: in the testcase,
> these expressions are redundant and if not gimplified in time, they
> end up to form an exponential tree of conditions.
> 
> With this patch we gimplify the predicates, and collect the gimple
> sequences during the analysis phase.  Because we now force the
> predicate of a BB to be an SSA_NAME, this is what is used further on
> for the next basic block, avoiding the full expression to be
> recomputed.  When the if-conversion analysis fails, the SSA_NAMEs used
> in the gimple sequences are released using free_stmt_operands.
> Otherwise the gimple sequences are inserted in the end of each basic
> block that is predicated by these computations.  These computations
> are then used in the if-conversion of the PHI nodes following the BB.
> 
> The patch passed make -k check RUNTESTFLAGS=tree-ssa.exp and vect.exp
> and is right now under regstrap on amd64-linux.  Ok for trunk after regstrap?

Ok.

Thanks,
Richard.



More information about the Gcc-patches mailing list