Re: Typecasting information in MEM[...] GIMPLE

2015-07-29 Thread Uday Khedker
On 07/28/2015 01:06 PM, Richard Biener wrote: As Jakub said this is not the full story if you factor in type-based aliasing. Also you of course have to account for the offset in operand 1. Okay. We understood the details after a bit of reading. For statement involving MEM[...], TREE_TYPE

Re: Typecasting information in MEM[...] GIMPLE

2015-07-28 Thread Richard Biener
On Mon, Jul 27, 2015 at 4:43 PM, Uday P. Khedker u...@cse.iitb.ac.in wrote: Jakub Jelinek wrote on Monday 27 July 2015 03:50 PM: On Mon, Jul 27, 2015 at 03:35:45PM +0530, Uday Khedker wrote: We are interested in extracting the type of a tree node that appears within MEM_REF. Given a C

Re: Typecasting information in MEM[...] GIMPLE

2015-07-27 Thread Richard Biener
On Mon, Jul 27, 2015 at 12:20 PM, Jakub Jelinek ja...@redhat.com wrote: On Mon, Jul 27, 2015 at 03:35:45PM +0530, Uday Khedker wrote: We are interested in extracting the type of a tree node that appears within MEM_REF. Given a C program: struct node * * pvar; struct node qvar;

Re: Typecasting information in MEM[...] GIMPLE

2015-07-27 Thread Uday P. Khedker
Jakub Jelinek wrote on Monday 27 July 2015 03:50 PM: On Mon, Jul 27, 2015 at 03:35:45PM +0530, Uday Khedker wrote: We are interested in extracting the type of a tree node that appears within MEM_REF. Given a C program: struct node * * pvar; struct node qvar; pvar = (struct

Typecasting information in MEM[...] GIMPLE

2015-07-27 Thread Uday Khedker
We are interested in extracting the type of a tree node that appears within MEM_REF. Given a C program: struct node * * pvar; struct node qvar; pvar = (struct node * *) malloc (sizeof (struct node *)); *pvar = qvar; It is transformed into the following GIMPLE code: void *

Re: Typecasting information in MEM[...] GIMPLE

2015-07-27 Thread Jakub Jelinek
On Mon, Jul 27, 2015 at 03:35:45PM +0530, Uday Khedker wrote: We are interested in extracting the type of a tree node that appears within MEM_REF. Given a C program: struct node * * pvar; struct node qvar; pvar = (struct node * *) malloc (sizeof (struct node *)); *pvar =