Displaying 4 results from an estimated 4 matches for "scc_".
Did you mean:
scc
2006 Sep 29
2
[LLVMdev] FunctionPass requiring SCCs
On Sep 29, 2006, at 2:05 PM, Domagoj Babic wrote:
>
> Check out scc_* iterators. Also note that the call graph
> is not aware of the indirect calls, so you will need to write your
> own CG implementation if you need to handle function pointers
> soundly.
>
Chris, is this true? If so, it seems like a bad property for the
CallGraphSCCPass framework....
2006 Sep 29
2
[LLVMdev] FunctionPass requiring SCCs
I have a FunctionPass F that needs a list of all the SCCs for use in its
doFinalization() method. Let's say I write a CallGraphSCCPass C that
creates an array of all SCCs. Let C be required by F, and let F call
getAnalysis<C>() from its doFinalization() method. Am I guaranteed that
C's runOnSCC() method will have executed on all SCCs before F's
doFinalization() method?
2006 Sep 29
0
[LLVMdev] FunctionPass requiring SCCs
...lization() method, am I guaranteed that C will have been
> able to build the array of SCCs? If not, how else might I structure things?
That should work. I've written such code, something like:
bool doFinalization(Module &M) {
CallGraph &CG = getAnalysis<CallGraph>();
for (scc_iterator<CallGraph*> SCCI = scc_begin(&CG),
SCCE = scc_end(&CG); SCCI != SCCE; ++SCCI) {
unsigned size = (*SCCI).size();
for (unsigned i = 0; i < size; ++i) {
Function *F = (*SCCI)[i]->getFunction();
......
}
}
....
}
Check out scc_* iterators. Al...
2006 Sep 30
0
[LLVMdev] FunctionPass requiring SCCs
On Fri, 29 Sep 2006, Vikram Adve wrote:
> On Sep 29, 2006, at 2:05 PM, Domagoj Babic wrote:
>> Check out scc_* iterators. Also note that the call graph
>> is not aware of the indirect calls, so you will need to write your
>> own CG implementation if you need to handle function pointers
>> soundly.
> Chris, is this true? If so, it seems like a bad property for the
> CallGraphSCCPass...