Re: [PATCH 0/3] Fix PR47654 and PR49649

2011-07-18 Thread Tobias Grosser
On 07/19/2011 12:33 AM, Sebastian Pop wrote: On Mon, Jul 18, 2011 at 16:40, Tobias Grosser wrote: You are right. In case we want to downcast b we would also need to prove that b itself fits into the smaller type. (This may happen, if the larger type was introduced earlier to remove casts, but i

Re: [PATCH 0/3] Fix PR47654 and PR49649

2011-07-18 Thread Sebastian Pop
On Mon, Jul 18, 2011 at 16:40, Tobias Grosser wrote: > You are right. In case we want to downcast b we would also need to prove > that b itself fits into the smaller type. (This may happen, if the larger > type was introduced earlier to remove casts, but is not needed to store the > result). [...

Re: [PATCH 0/3] Fix PR47654 and PR49649

2011-07-18 Thread Tobias Grosser
On 07/18/2011 07:07 PM, Sebastian Pop wrote: On Mon, Jul 18, 2011 at 11:11, Tobias Grosser wrote: We introduce casts when we generate code for an expression with a type smaller than the types of its constituents. So the next question is: What is the type of the expression. As far as I underst

Re: [PATCH 0/3] Fix PR47654 and PR49649

2011-07-18 Thread Sebastian Pop
On Mon, Jul 18, 2011 at 11:11, Tobias Grosser wrote: >> We introduce casts when we generate code for an expression with a type >> smaller than the types of its constituents. > > So the next question is: What is the type of the expression. As far as I > understand we decide ourselves which type the

Re: [PATCH 0/3] Fix PR47654 and PR49649

2011-07-18 Thread Tobias Grosser
On 07/18/2011 05:03 PM, Sebastian Pop wrote: On Sun, Jul 17, 2011 at 19:41, Tobias Grosser wrote: Accessing a[100] is undefined in C, so i<100, and so n<= 100. Sure. I am just surprised we already include this information in graphite. Do we add this to the context? Yes, that's added to

Re: [PATCH 0/3] Fix PR47654 and PR49649

2011-07-18 Thread Sebastian Pop
On Sun, Jul 17, 2011 at 19:41, Tobias Grosser wrote: >> Accessing a[100] is undefined in C, so i<  100, and so n<= 100. > > Sure. I am just surprised we already include this information in graphite. > Do we add this to the context? Yes, that's added to the context as a bound on the loop iteration

Re: [PATCH 0/3] Fix PR47654 and PR49649

2011-07-17 Thread Tobias Grosser
On 07/17/2011 07:55 AM, Sebastian Pop wrote: Hi Tobias, On Sat, Jul 16, 2011 at 20:02, Tobias Grosser wrote: Here I am a little lost. You write using the precise method you get an interval [0,99] for the example in vect-pr43423.c. This is the example: int a[100], b[100], c[100]; void foo(int

Re: [PATCH 0/3] Fix PR47654 and PR49649

2011-07-17 Thread Sebastian Pop
Hi Tobias, On Sat, Jul 16, 2011 at 20:02, Tobias Grosser wrote: > Here I am a little lost. You write using the precise method you get an > interval [0,99] for the example in vect-pr43423.c. This is the example: > > int a[100], b[100], c[100]; > > void foo(int n, int mid) > { >  int i; >  for(i=0;

Re: [PATCH 0/3] Fix PR47654 and PR49649

2011-07-16 Thread Tobias Grosser
On 07/07/2011 08:07 PM, Sebastian Pop wrote: Hi, Hi Sebastian, sorry for taking so long. Here some comments from me: First there are two cleanup patches independent of the fix: Start counting nesting level from 0. Do not compute twice type, lb, and ub. Then the patch that fixes PR476

Re: [PATCH 0/3] Fix PR47654 and PR49649

2011-07-15 Thread Sebastian Pop
On Fri, Jul 8, 2011 at 03:32, Richard Guenther wrote: > On Thu, 7 Jul 2011, Sebastian Pop wrote: > >> Hi, >> >> First there are two cleanup patches independent of the fix: >> >>   Start counting nesting level from 0. >>   Do not compute twice type, lb, and ub. >> >> Then the patch that fixes PR476

Re: [PATCH 0/3] Fix PR47654 and PR49649

2011-07-08 Thread Richard Guenther
On Thu, 7 Jul 2011, Sebastian Pop wrote: > Hi, > > First there are two cleanup patches independent of the fix: > > Start counting nesting level from 0. > Do not compute twice type, lb, and ub. > > Then the patch that fixes PR47654: > > Fix PR47654: Compute LB and UB of a CLAST expression

[PATCH 0/3] Fix PR47654 and PR49649

2011-07-07 Thread Sebastian Pop
Hi, First there are two cleanup patches independent of the fix: Start counting nesting level from 0. Do not compute twice type, lb, and ub. Then the patch that fixes PR47654: Fix PR47654: Compute LB and UB of a CLAST expression. One of the reasons we cannot determine the IV type only fro