Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2013-01-25 Thread Richard Biener
On Thu, Jan 24, 2013 at 3:17 PM, Uday P. Khedker u...@cse.iitb.ac.in wrote: Richard Biener wrote, On Thursday 24 January 2013 05:28 PM: In the program below, we have a global pointer p that has conditional assignments before its use on the RHS of a copy statement.

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2013-01-24 Thread Uday P. Khedker
Richard Biener wrote, On Thursday 24 January 2013 01:57 AM: On Wed, Jan 23, 2013 at 8:12 PM, Uday Khedker u...@cse.iitb.ac.in wrote: Hi Richard, I am trying to understand the full implications of your statement: Yes, that's what I say. Any pointer that is dereferenced is first copied to

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2013-01-24 Thread Richard Biener
On Thu, Jan 24, 2013 at 9:02 AM, Uday P. Khedker u...@cse.iitb.ac.in wrote: Richard Biener wrote, On Thursday 24 January 2013 01:57 AM: On Wed, Jan 23, 2013 at 8:12 PM, Uday Khedker u...@cse.iitb.ac.in wrote: Hi Richard, I am trying to understand the full implications of your statement:

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2013-01-24 Thread Uday P. Khedker
Richard Biener wrote, On Thursday 24 January 2013 05:28 PM: In the program below, we have a global pointer p that has conditional assignments before its use on the RHS of a copy statement. -

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2013-01-23 Thread Uday Khedker
Hi Richard, I am trying to understand the full implications of your statement: Yes, that's what I say. Any pointer that is dereferenced is first copied to an SSA name. Basically everything residing in memory first has to be loaded to an SSA name before it can be dereferenced. That load

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2013-01-23 Thread Richard Biener
On Wed, Jan 23, 2013 at 8:12 PM, Uday Khedker u...@cse.iitb.ac.in wrote: Hi Richard, I am trying to understand the full implications of your statement: Yes, that's what I say. Any pointer that is dereferenced is first copied to an SSA name. Basically everything residing in memory first

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2012-10-17 Thread Uday Khedker
On Saturday 13 October 2012 02:34 AM, Xinliang David Li wrote: Somewhere it is mentioned that heap is handled conservatively. Does it mean the algorithm can not disambiguate heap objects all all, or it can but does not track pointer values stored in heap objects? How about field sensitivity?

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2012-10-12 Thread Uday P. Khedker
Andrew Pinski wrote, On Friday 12 October 2012 11:26 AM: Except the problem here is just about what f1 clobbers. Since a has not escaped by the time f1 is called, f1 cannot clobber a (or d). http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23384 for reference on why GCC gets this incorrect. GCC

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2012-10-12 Thread Richard Biener
On Fri, Oct 12, 2012 at 7:41 AM, Uday P. Khedker u...@cse.iitb.ac.in wrote: Andrew Pinski wrote, On Friday 12 October 2012 10:29 AM: Here's an example: main() { int **p; int *a, *d; int w, x; a = w; f1(a); p = a; a =

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2012-10-12 Thread Uday P. Khedker
Richard Biener wrote, On Friday 12 October 2012 02:51 PM: we _always_ see ssa_name_1 = a; use (ssa_name_1); so you have a place to associate your flow-sensitive and context-sensitive points-to-info with (the SSA name). My point is that for _using_ the points-to info flow-sensitivity

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2012-10-12 Thread Richard Biener
On Fri, Oct 12, 2012 at 11:46 AM, Uday P. Khedker u...@cse.iitb.ac.in wrote: Richard Biener wrote, On Friday 12 October 2012 02:51 PM: we _always_ see ssa_name_1 = a; use (ssa_name_1); so you have a place to associate your flow-sensitive and context-sensitive points-to-info with

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2012-10-12 Thread Uday P. Khedker
Excellent! Thanks. Uday. Richard Biener wrote, On Friday 12 October 2012 03:20 PM: On Fri, Oct 12, 2012 at 11:46 AM, Uday P. Khedker u...@cse.iitb.ac.in wrote: Richard Biener wrote, On Friday 12 October 2012 02:51 PM: we _always_ see ssa_name_1 = a; use (ssa_name_1); so you

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2012-10-12 Thread Xinliang David Li
Somewhere it is mentioned that heap is handled conservatively. Does it mean the algorithm can not disambiguate heap objects all all, or it can but does not track pointer values stored in heap objects? How about field sensitivity? For many programs (mostly C++ ones), this is very important. For

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2012-10-11 Thread Richard Biener
On Thu, Oct 11, 2012 at 5:04 AM, Uday P. Khedker u...@cse.iitb.ac.in wrote: Hi David, This is great progress. Thanks. If I understand the experiments, your implementtion has very small cost to perform the analysis, at least for the SPEC benchmarks you are testing. Have you connected

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2012-10-11 Thread Uday P. Khedker
That's actually not true. In fact existing GCC pointer analysis is flow-sensitive for all SSA pointers. SSA provides partial flow sensitivity to the top level pointers. For deeper pointers, one needs to interleave SSA and points-to analysis. Besides, it cannot handle global pointers which

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2012-10-11 Thread Diego Novillo
On Thu, Oct 11, 2012 at 11:53 AM, Uday P. Khedker u...@cse.iitb.ac.in wrote: That's actually not true. In fact existing GCC pointer analysis is flow-sensitive for all SSA pointers. SSA provides partial flow sensitivity to the top level pointers. For deeper pointers, one needs to

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2012-10-11 Thread Uday P. Khedker
Diego Novillo wrote, On Friday 12 October 2012 01:41 AM: On Thu, Oct 11, 2012 at 11:53 AM, Uday P. Khedker u...@cse.iitb.ac.in wrote: That's actually not true. In fact existing GCC pointer analysis is flow-sensitive for all SSA pointers. SSA provides partial flow sensitivity to the top

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2012-10-11 Thread Andrew Pinski
On Thu, Oct 11, 2012 at 9:41 PM, Uday P. Khedker u...@cse.iitb.ac.in wrote: Diego Novillo wrote, On Friday 12 October 2012 01:41 AM: On Thu, Oct 11, 2012 at 11:53 AM, Uday P. Khedker u...@cse.iitb.ac.in wrote: That's actually not true. In fact existing GCC pointer analysis is

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2012-10-11 Thread Uday P. Khedker
Andrew Pinski wrote, On Friday 12 October 2012 10:29 AM: Here's an example: main() { int **p; int *a, *d; int w, x; a = w; f1(a); p = a; a = x; f2(p); d = a; return *d; } It is clear that d can only

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2012-10-11 Thread Uday P. Khedker
decided to hold the address of a into a1 through function f1, let me eliminate the call to f1 and make the assignment a=w live in some other way. Here's the changed code: Please read it as eliminate the call passing a to f1. Uday.

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2012-10-11 Thread Andrew Pinski
On Thu, Oct 11, 2012 at 10:41 PM, Uday P. Khedker u...@cse.iitb.ac.in wrote: Andrew Pinski wrote, On Friday 12 October 2012 10:29 AM: Here's an example: main() { int **p; int *a, *d; int w, x; a = w; f1(a); p = a; a =

Fully flow and context sensitive points-to analysis in GCC 4.6.0

2012-10-10 Thread Uday P. Khedker
We have designed and implemented a fully flow and context sensitive points-to analysis in gcc-4.6.0. For simplicity, we have made a dynamic plugin available at http://www.cse.iitb.ac.in/grc/index.php?page=l-fcpa. This page also provides an overview of the method, and links to the paper,

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2012-10-10 Thread David Edelsohn
On Wed, Oct 10, 2012 at 1:56 PM, Uday P. Khedker u...@cse.iitb.ac.in wrote: We have designed and implemented a fully flow and context sensitive points-to analysis in gcc-4.6.0. For simplicity, we have made a dynamic plugin available at http://www.cse.iitb.ac.in/grc/index.php?page=l-fcpa. This

Re: Fully flow and context sensitive points-to analysis in GCC 4.6.0

2012-10-10 Thread Uday P. Khedker
Hi David, This is great progress. Thanks. If I understand the experiments, your implementtion has very small cost to perform the analysis, at least for the SPEC benchmarks you are testing. Have you connected the analysis to any optimizations? Is there any improvement in performance on