MCPcopy Create free account
hub / github.com/Samsung/UTopia / find

Method find

tests/rootdefanalysis/TestRootDef.cpp:12–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10class TestRDAnalyzer : public TestBase {
11protected:
12 std::set<RDNode> find(std::string FuncName, unsigned BIdx, unsigned IIdx,
13 unsigned OIdx, std::vector<std::string> FuncsToExplore,
14 RDExtension *Extension) {
15 if (!IRAH)
16 return {};
17
18 auto *I = IRAH->getInstruction(FuncName, BIdx, IIdx);
19 if (!I)
20 return {};
21
22 if (I->getNumOperands() <= OIdx)
23 return {};
24
25 const auto &U = I->getOperandUse(OIdx);
26
27 std::vector<llvm::Function *> Funcs;
28 for (const auto &Func : FuncsToExplore) {
29 auto *F = IRAH->getFunction(Func);
30 if (!F)
31 return {};
32
33 Funcs.push_back(F);
34 }
35
36 RDAnalyzer Analyzer(0, Extension);
37 Analyzer.setSearchSpace(Funcs);
38 return Analyzer.getRootDefinitions(U);
39 }
40};
41
42TEST_F(TestRDAnalyzer, NoResultHandleRegisterN) {

Callers 15

TEST_FFunction · 0.45
TEST_FFunction · 0.45
verifyFirstUseFunction · 0.45
TEST_FFunction · 0.45
checkNewMethod · 0.45
checkModOneMethod · 0.45
TEST_FFunction · 0.45
foundMethod · 0.45
foundMethod · 0.45
getBasicBlockMethod · 0.45
getInstructionMethod · 0.45
addFileMethod · 0.45

Calls 4

getInstructionMethod · 0.80
getFunctionMethod · 0.80
setSearchSpaceMethod · 0.80
getRootDefinitionsMethod · 0.80

Tested by

no test coverage detected