On Thu, 21 Jul 2011, Tobias Grosser wrote:

> On 07/21/2011 08:31 PM, Sebastian Pop wrote:
> > Hi,
> > 
> > This patch-set addresses the comments from Tobias on fixing PR47654.
> > 
> > The first patches are cleanups:
> > 
> > - Start counting nesting level from 0 and use the standard "Polyhedral
> >      SCattering Transformed" psct_* interface.
> > - Do not compute twice type, lb, and ub.
> > - Record the loop level that defines a clast_name.
> > - Cleanup function params using a struct.
> > - Add fixme comment.
> > - Rename gcc_type_for_clast_* into type_for_clast_*
> > - Remove max_signed_precision_type.
> > 
> > The following patch is an optimization:
> > 
> > - Compute once and cache the LB and UB for each clast_name.
> > 
> > that uses the hashtable of clast_names to also attach the information
> > on bounds of the name: this would avoid asking "polyhedral questions"
> > every time we see the name of an induction variable in an expression.
> > 
> > The following patch is also an optimization:
> > 
> > - Generate signed types whenever possible.
> > 
> > this makes us generate signed types instead of unsigned, whenever the
> > interval would still fit in a signed type of the same precision.
> > 
> > Finally the fix for PR47654:
> > 
> > - Infer types based on lb and ub.
> > 
> > I adapted the previous patch such that we now compute both the type
> > and the bounds during the same traversal of the CLAST tree.  The
> > computation of the type now also integrates the information of the
> > bounds of the sub-expressions and the result of the expression.
> > 
> > The patch-set bootstrapped and tested on amd64-linux.  Ok for trunk?
> 
> Hi Sebastian,
> 
> this looks nice. I tried, but was not able to find any bug. :-(
> I think this is definitely a big improvement. From my side it's OK to commit.

Looks ok to me as well.

Thanks,
Richard.

Reply via email to