Displaying 10 results from an estimated 10 matches for "scci".
Did you mean:
scc
2010 Nov 01
2
[LLVMdev] Identify recursion in a call graph
On Oct 30, 2010, at 4:38 AM, Duncan Sands wrote:
>> Is there any facility in LLVM to identify recursion in a call graph?
...
> use the facilities in SCCIterator.h, or declare your pass to be a
> CallGraphSCCPass in which case it will work one strongly connected
> component at a time.
Converting my ModulePass to a CallGraphSCCPass doesn't seem feasible,
so I'll use llvm::scc_iterator. Here's what I have so far:
bool MyModulePass...
2010 Nov 02
0
[LLVMdev] Identify recursion in a call graph
...g my ModulePass to a CallGraphSCCPass doesn't seem feasible, so I'll
> use llvm::scc_iterator. Here's what I have so far:
>
> bool MyModulePass::isRecursive() {
> CallGraphNode* rootNode = getAnalysis<CallGraph>().getRoot();
> for (scc_iterator<CallGraphNode*> SCCI = scc_begin(rootNode), E =
> scc_end(rootNode); SCCI != E; ++SCCI) {
> const std::vector<CallGraphNode*> &nextSCC = *SCCI;
> if (nextSCC.size() == 1 && SCCI.hasLoop()) {
> return true;
> }
> }
> return false;
> }
>
> This correctly identifies direct (...
2010 Nov 02
2
[LLVMdev] Identify recursion in a call graph
...SCCPass doesn't seem feasible, so
> I'll
> > use llvm::scc_iterator. Here's what I have so far:
> >
> > bool MyModulePass::isRecursive() {
> > CallGraphNode* rootNode = getAnalysis<CallGraph>().getRoot();
> > for (scc_iterator<CallGraphNode*> SCCI = scc_begin(rootNode), E =
> > scc_end(rootNode); SCCI != E; ++SCCI) {
> > const std::vector<CallGraphNode*> &nextSCC = *SCCI;
> > if (nextSCC.size() == 1 && SCCI.hasLoop()) {
> > return true;
> > }
> > }
> > return false;
> > }
>...
2010 Oct 29
2
[LLVMdev] Identify recursion in a call graph
Hi,
Is there any facility in LLVM to identify recursion in a call graph? I
realize this is undecidable in the general case due to function
pointers, but at least the static cases could be identified. I don't
even care about whole-program recursion, just looking at a single
module would suffice. But I don't see anything like this already in
LLVM, so do I simply write some code to
2010 Oct 30
0
[LLVMdev] Identify recursion in a call graph
...es could be identified. I don't
> even care about whole-program recursion, just looking at a single
> module would suffice. But I don't see anything like this already in
> LLVM, so do I simply write some code to look for cycles in the call
> graph? Thanks,
use the facilities in SCCIterator.h, or declare your pass to be a
CallGraphSCCPass in which case it will work one strongly connected
component at a time.
Ciao,
Duncan.
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
...eed 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. Also note that the call graph
is...
2010 Nov 02
0
[LLVMdev] Identify recursion in a call graph
...feasible, so
>> I'll
>> > use llvm::scc_iterator. Here's what I have so far:
>> >
>> > bool MyModulePass::isRecursive() {
>> > CallGraphNode* rootNode = getAnalysis<CallGraph>().getRoot();
>> > for (scc_iterator<CallGraphNode*> SCCI = scc_begin(rootNode), E =
>> > scc_end(rootNode); SCCI != E; ++SCCI) {
>> > const std::vector<CallGraphNode*> &nextSCC = *SCCI;
>> > if (nextSCC.size() == 1 && SCCI.hasLoop()) {
>> > return true;
>> > }
>> > }
>> > re...
2007 Sep 24
2
parted - is there a problem
Everyone,
I recently added a 300gig Seagate sata drive on a Centos 5.0 and have a
couple of questions.
The drive was recognized with the device as /dev/sdc. The system came
with some SCCI drives that are labeled as /dev/sda and /dev/sdb. I was
surprised that the sata drives used sdc. Are the sata drives considered
more like SCCI or IDE drives?
The real problem occurred when I tried to partition the drive with
parted. I used he command mkpart to form one partition of 300 gigs
w...
2010 Nov 05
3
[LLVMdev] Identify recursion in a call graph
On Nov 2, 2010, at 11:08 PM, Nick Lewycky wrote:
> The unittests/ directory contains C++ unit tests for arbitrary C++
> APIs
> that don't fit the dejagnu model of running opt or llc over .ll files.
Thanks for the tip. Attached is a patch+testcase that adds
CallGraphNode::isRecursive to LLVM. Could someone with commit access
please review and apply? Thanks,
Trevor