[llvm-commits] [llvm] r80566 - in /llvm/trunk: include/llvm/Analysis/CallGraph.h lib/Analysis/IPA/CallGraph.cpp lib/Analysis/IPA/CallGraphSCCPass.cpp

Duncan Sands baldrick at free.fr
Mon Aug 31 01:31:34 PDT 2009


Hi Chris, this seems like a reasonable approach.

> +  // The the function pass(es) modified the IR, they may have clobbered the

The the -> The

> +  MadeChange = MadeChange;

Doesn't seem very useful :)

> +  // Scan all functions in the SCC.

Can a function pass muck with CurSCC?

> +    if (F == 0 || F->isDeclaration()) continue;

What about functions with weak linkage?  Also, I think this routine
should live in the same file as the other callgraph computing
routines.  Perhaps it can be merged somehow with the existing CG
calculation.  (That way, if someone modifies the interaction between,
say, weak linkage and how the callgraph is calculated, this won't
be forgotten).

> +    if (!CallGraphUpToDate)
> +      RefreshCallGraph(CurSCC, CG);

Don't you need to set CallGraphUpToDate to "true" here?

Ciao,

Duncan.



More information about the llvm-commits mailing list