Re: Detecting global pointers

2011-05-04 Thread Matt Davis
On Wed, May 4, 2011 at 7:38 PM, Richard Guenther wrote: > On Wed, May 4, 2011 at 6:16 AM, Matt Davis wrote: >> I am writing a gcc plugin and am trying to detect if a value assigned by a >> function call, is a global variable or not.  Unfortunately, all calls to >> 'is_global_var' with a DECL type

Re: Detecting global pointers

2011-05-04 Thread Richard Guenther
On Wed, May 4, 2011 at 6:16 AM, Matt Davis wrote: > I am writing a gcc plugin and am trying to detect if a value assigned by a > function call, is a global variable or not.  Unfortunately, all calls to > 'is_global_var' with a DECL type are returning false. > > My pass executes after alias analysi

Detecting global pointers

2011-05-03 Thread Matt Davis
I am writing a gcc plugin and am trying to detect if a value assigned by a function call, is a global variable or not. Unfortunately, all calls to 'is_global_var' with a DECL type are returning false. My pass executes after alias analysis, and ipa analysis. The cfun->gimple_df->ipa_pta is set to