MCPcopy Create free account
hub / github.com/AdaptiveCpp/AdaptiveCpp / descendCallGraphAndAdd

Function descendCallGraphAndAdd

src/compiler/sscp/KernelOutliningPass.cpp:54–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52
53template<class FunctionSetT>
54void descendCallGraphAndAdd(llvm::Function* F, llvm::CallGraph& CG, FunctionSetT& Set){
55 if(!F || Set.contains(F))
56 return;
57
58 Set.insert(F);
59 llvm::CallGraphNode* CGN = CG.getOrInsertFunction(F);
60 if(!CGN)
61 return;
62 for(unsigned i = 0; i < CGN->size(); ++i){
63 descendCallGraphAndAdd((*CGN)[i]->getFunction(), CG, Set);
64 }
65}
66
67// Check whether F is used by an instruction from any function contained in
68// a set S

Callers 1

runMethod · 0.85

Calls 3

containsMethod · 0.45
insertMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected