This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re:Access to symbol table??
- From: "Seema S. Ravandale" <ravandale at cse dot iitb dot ac dot in>
- To: "Daniel Berlin" <dberlin at dberlin dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 31 May 2007 23:51:32 +0530 (IST)
- Subject: Re:Access to symbol table??
- Reply-to: ravandale at cse dot iitb dot ac dot in
Hello sir,
Thank you for help. you have already cleared my confusion.
But I am working on inter-procedural data flow analysis. And i am trying
to implement IPDFA on gimple-CFG IR.
So at IR level all usages of global variable are replaced by some local
variables of kind global.0, global.1 etc...
But I am trying to visualize all of them as usages of global variable.
In code sample below,let gl is global var.
1: c = gl+b;
2: array[0] = gl;
3: gl = 10;
at line number 1,2 gl is used and at line number 3 it is defined.
But in IR we will have...
1: gl.0 = gl;
2: c = gl.0 + b;
3: gl.1 = gl;
4: array[0] = gl.1
5: gl = 10;
so here local variables gl.0 gl.1 are aliased to gl
So i have decided to have some common index to all local version of global
variables same as index assigned (by me) to corr. global variable. So that
any occurance of such local variable is interpreted as corr. global
variable itself.
I already did that, using flag ignored_flag, artificial_flag,
seen_in_bind_expr and comparing substring(prefix in gl.0) with name of
original global variable.
So i was trying to find whether there is any way GCC stores this
information or not? And just point of curiosity, how GCC stores scope
information at IR level...
-Seema