Re: Unable to access fields of a record type in some cases

2016-09-19 Thread Swati Rathi
On 2016-09-19 21:04, David Malcolm wrote: On Mon, 2016-09-19 at 10:09 +0200, Richard Biener wrote: On Mon, Sep 19, 2016 at 3:52 AM, Swati Rathi < swatira...@cse.iitb.ac.in> wrote: > Hello, > > We want to fetch fields of a record type from the formal arguments > of a &

Unable to access fields of a record type in some cases

2016-09-18 Thread Swati Rathi
Hello, We want to fetch fields of a record type from the formal arguments of a function. For a RECORD_TYPE, we fetch the fields using TYPE_FIELDS. In the program 471.omnetpp (from the SPEC CPU2006 benchmark suite), we encountered a case where we were not able to access the fields. Below is t

Re: Compilation of object creation in C++

2015-08-21 Thread Swati Rathi
On 2015-08-21 16:16, Richard Biener wrote: On Fri, Aug 21, 2015 at 12:44 PM, Uday P. Khedker wrote: On 08/19/2015 04:44 PM, Andrew Pinski wrote: On Wed, Aug 19, 2015 at 7:16 PM, Uday P. Khedker wrote: Why is this different? Why is __comp_ctor not invoked in each case? This looks like

Re: How to extract types of variables and its uid?

2015-04-11 Thread Swati Rathi
On Friday 10 April 2015 01:00 PM, Richard Biener wrote: Or is there any other unique feature to distinguish between two tree types, >other than type uid? Depends on the definition of the equality relation. We have considered the file name and line number where the types are defined as a unique

Re: How to extract types of variables and its uid?

2015-04-09 Thread Swati Rathi
, Andrew Pinski wrote: On Thu, Apr 9, 2015 at 10:40 PM, Swati Rathi wrote: Even I am getting same uid's on small programs. I tried declaring variables across files also. But I am unable to replicate the problem on small programs. I am testing on SPEC CPU2006 benchmark suite, program - 453.p

Re: How to extract types of variables and its uid?

2015-04-09 Thread Swati Rathi
t IStreamD.5363 * D.10579; -- On Thursday 09 April 2015 04:13 PM, Richard Biener wrote: On Thu, Apr 9, 2015 at 12:41 PM, Swati Rathi wrote: The variables are declared as you have mentioned. IStream *var1; IStream *var2; Also, var1 and var2 are declared in different

Re: How to extract types of variables and its uid?

2015-04-09 Thread Swati Rathi
The variables are declared as you have mentioned. IStream *var1; IStream *var2; Also, var1 and var2 are declared in different functions. On Thursday 09 April 2015 03:30 PM, Richard Biener wrote: On Thu, Apr 9, 2015 at 11:57 AM, Swati Rathi wrote: We want to store all the types associated

How to extract types of variables and its uid?

2015-04-09 Thread Swati Rathi
We want to store all the types associated with the class objects or pointer to a class in a program. Consider two variables var1 and var2 declared in different functions as below. class IStream *var1; class IStream *var2; We are extracting its type as below : tree type1 = TREE_T

Re: How to access the function body of a constructor?

2014-11-08 Thread Swati Rathi
er, in the LTO mode this information is not available. How do I make this information available in the LTO framework? Is there any other way to get the cloned copy of the constructor "__base_ctor" from "__comp_ctor"? Regards, Swati On Monday 15 September 2014 03:41 PM, Sw

Re: How to identify the type of the object being created using the new operator?

2014-10-06 Thread Swati Rathi
On Monday 06 October 2014 02:28 PM, Marc Glisse wrote: On Mon, 6 Oct 2014, Swati Rathi wrote: Statement : A *a = new B; gets translated in GIMPLE as 1. void * D.2805; 2. struct A * a; 3. D.2805 = operator new (20); 4. a = D.2805; A is the base class and B is the derived class. In statement 3

How to identify the type of the object being created using the new operator?

2014-10-06 Thread Swati Rathi
Hello, Statement : A *a = new B; gets translated in GIMPLE as 1. void * D.2805; 2. struct A * a; 3. D.2805 = operator new (20); 4. a = D.2805; A is the base class and B is the derived class. In statement 3, new operator is creating an object of derived class B. By analyzing the RHS of the assig

How to access the function body of a constructor?

2014-09-15 Thread Swati Rathi
I am trying to access the body of a constructor. My pass is hooked after pass_ipa_pta. Constructor for a class is invoked as : __comp_ctor (&b); However the constructor body is dumped as __base_ctor (struct B * const this) { : } I am not able to access basic blocks f

Re: How to access the virtual table?

2014-09-12 Thread Swati Rathi
On Friday 12 September 2014 12:14 PM, Jan Hubicka wrote: I am trying to access the virtual table. My pass is hooked after pass_ipa_pta. Consider Class A which contains virtual function. An object created as : A a; is translated in GIMPLE as struct A a; From variable "a" we can get it

How to access the virtual table?

2014-09-11 Thread Swati Rathi
I am trying to access the virtual table. My pass is hooked after pass_ipa_pta. Consider Class A which contains virtual function. An object created as : A a; is translated in GIMPLE as struct A a; From variable "a" we can get its type which is "struct A". I tried to see how the dump_vtab

Re: How to identify object of a class defined in library file

2014-09-08 Thread Swati Rathi
r<< (D.2781_2, endl); I want to ignore variables D.2782 and D.2781 as they are object of class defined in standard library file. On Monday 08 September 2014 05:12 PM, Jonathan Wakely wrote: On 8 September 2014 11:53, Swati Rathi wrote: How to identify object of a class which is define

How to identify object of a class defined in library file

2014-09-08 Thread Swati Rathi
How to identify object of a class which is defined in the library file? For e.g. struct basic_ostream & D.2782; Variable D.2782 is object of class which is part of the library file. How can we identify such a variable? Regards, Swati

Re: How to access points-to information for function pointers

2014-05-05 Thread Swati Rathi
On Monday 05 May 2014 04:37 PM, Richard Biener wrote: On Mon, May 5, 2014 at 11:38 AM, Swati Rathi wrote: In some cases, GCC's pta pass does not dump the points-to information for function pointers which are formal parameters. Why is it so? Depends on the case. Also it does not stor

Re: How to access points-to information for function pointers

2014-05-05 Thread Swati Rathi
14 02:47 PM, Richard Biener wrote: On Tue, Apr 29, 2014 at 8:26 AM, Swati Rathi wrote: On Monday 28 April 2014 02:46 PM, Richard Biener wrote: On Sat, Apr 26, 2014 at 4:07 PM, Richard Biener wrote: On April 26, 2014 12:31:34 PM CEST, Swati Rathi wrote: On Friday 25 April 2014 11:11 PM, Ri

Re: How to access points-to information for function pointers

2014-04-28 Thread Swati Rathi
On Monday 28 April 2014 02:46 PM, Richard Biener wrote: On Sat, Apr 26, 2014 at 4:07 PM, Richard Biener wrote: On April 26, 2014 12:31:34 PM CEST, Swati Rathi wrote: On Friday 25 April 2014 11:11 PM, Richard Biener wrote: On April 25, 2014 5:54:09 PM CEST, Swati Rathi wrote: Hello, I

Re: How to access points-to information for function pointers

2014-04-26 Thread Swati Rathi
On Friday 25 April 2014 11:11 PM, Richard Biener wrote: On April 25, 2014 5:54:09 PM CEST, Swati Rathi wrote: Hello, I am trying to print points-to information for SSA variables as below. for (i = 1; i < num_ssa_names; i++) { tree ptr = ssa_name (i); str

How to access points-to information for function pointers

2014-04-25 Thread Swati Rathi
Hello, I am trying to print points-to information for SSA variables as below. for (i = 1; i < num_ssa_names; i++) { tree ptr = ssa_name (i); struct ptr_info_def *pi; if (ptr == NULL_TREE || SSA_NAME_IN_FREE_LIST (ptr)) continue; pi = SSA_NAME_PTR

Re: How to access structure information from "pass_vectorize"

2014-01-20 Thread Swati Rathi
On Monday 20 January 2014 02:20 PM, Richard Biener wrote: On Sun, Jan 19, 2014 at 6:01 PM, Swati Rathi wrote: We are writing a GIMPLE pass and would like to use some information computed in pass_vectorize. However, we are not able to use the data structures which gets populated in

How to access structure information from "pass_vectorize"

2014-01-19 Thread Swati Rathi
We are writing a GIMPLE pass and would like to use some information computed in pass_vectorize. However, we are not able to use the data structures which gets populated in pass_vectorize because the information is not made available across passes. In particular, we wish to access the structures