This is the mail archive of the
mailing list for the GCC project.
How to get global declarations in GIMPLE
- From: "Mayank Bomb" <mayankb at mail dot utexas dot edu>
- To: <gcc at gcc dot gnu dot org>
- Date: Fri, 31 Mar 2006 09:38:25 -0600
- Subject: How to get global declarations in GIMPLE
I was trying to convert the gcc C-Gimple form to the internal AST
representation used in our research compiler. I was able to transform most
of the nodes of the GIMPLE tree but was not able to find out a way to
retrieve the global declarations from the GIMPLE tree. For example is there
a way to get the declarations of structs and unions etc that are there at
the translation unit level and declared at the function scope?
One place I figured, to get this information is when the C-file is being
parsed by the parser. However this requires changing the gcc front end in a
big way which we wanted to avoid. I was wondering if anyone can help me
figure out a way to retrieve this information from the GIMPLE tree itself.
Thanks a lot.