[LLVMdev] Identify recursion in a call graph
Frits van Bommel
fvbommel at gmail.com
Fri Nov 5 18:04:04 PDT 2010
On Fri, Nov 5, 2010 at 11:21 PM, Trevor Harmon <trevor.w.harmon at nasa.gov> wrote:
> On Nov 2, 2010, at 11:08 PM, Nick Lewycky wrote:
> 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,
I don't have commit access, but I can review:
+ const std::vector<CallGraphNode*> &nextSCC = *SCCI;
+ if (nextSCC.size() > 1 || SCCI.hasLoop()) {
+ return true;
+ }
The "nextSCC.size() > 1" is redundant because SCCI.hasLoop() already
checks that first thing. Because of this, the nextSCC declaration can
be removed entirely.
More information about the llvm-dev
mailing list