[LLVMdev] globals in DS graph
Vikram Adve
vadve at cs.uiuc.edu
Tue Nov 26 07:31:01 PST 2002
Ganesh,
Every graph has a separate copy of the node for a global.
There is no sharing of nodes between graphs. For any particular
global object (a GlobalValue*), you can find the node for that
global in each graph from the ScalarMap for that graph.
Eventually, irrelevant^(*) globals within each function's graph will
be deleted but other globals will stay the same as they are now.
When that happens, we will need to fully implement the globals
graph for our graph construction algorithm, but even then many
clients (including yours) may never really need to know about
the globals graph.
(*) A global is irrelevant in a function if it is not reachable from
and cannot reach any node that is accessible within that function.
Such a global cannot be used to reference or modify any accessible
node within that function.
--Vikram
http://www.cs.uiuc.edu/~vadve
> From: Ganesh Bikshandi <bikshand at students.uiuc.edu>
> Date: Mon, 25 Nov 2002 17:46:33 -0600 (CST)
> Subject: Re: [LLVMdev] globals in DS graph
>
> Prof. Vikram,
>
> I updated the DataStructure.cpp and recompiled the llvm. But still I have
> the same scenario. I don't get the same DSnode for global. I tried several
> methods; but none of them were successful. I used the getNodeForValue and
> again I found that the global value had different nodes in different
> functions. However, the getGlobals worked well for function call.
>
> Thanks,
> Ganesh
> On Mon, 25 Nov 2002, Vikram Adve wrote:
>
> > Ganesh,
> >
> > I modified DataStructure.cpp so that global nodes are no longer
> > removed from any graphs. Only that file has changed.
> >
> > Chris, if you get a chance to do this, it would be nice if you could
> > take a quick look at the change I made and make sure that's all that's
> > needed.
> >
> > Thanks,
> >
> > --Vikram
> > http://www.cs.uiuc.edu/~vadve
More information about the llvm-dev
mailing list