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

Method getInstruction

tests/testutil/IRAccessHelper.cpp:48–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48llvm::Instruction *
49IRAccessHelper::getInstruction(std::string Name, unsigned BIdx, unsigned IIdx) {
50 auto *B = getBasicBlock(Name, BIdx);
51 if (!B)
52 return nullptr;
53
54 auto Iter = Instructions.find(B);
55 if (Iter == Instructions.end())
56 return nullptr;
57
58 auto &Instructions = Iter->second;
59 if (Instructions.size() < IIdx)
60 return nullptr;
61
62 const auto *I = Instructions[IIdx];
63 if (!I)
64 return nullptr;
65
66 return const_cast<llvm::Instruction *>(I);
67}
68
69llvm::GlobalVariable *IRAccessHelper::getGlobalVariable(std::string Name) {
70 auto *GV = M.getGlobalVariable(Name, true);

Callers 15

getADNMethod · 0.80
TEST_FFunction · 0.80
analyzeMethod · 0.80
existMethod · 0.80
findMethod · 0.80
TEST_FFunction · 0.80
verifyFirstUseFunction · 0.80
TEST_FFunction · 0.80
getASTDefNodeMethod · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80
TEST_FFunction · 0.80

Calls 3

endMethod · 0.80
sizeMethod · 0.80
findMethod · 0.45

Tested by 15

getADNMethod · 0.64
TEST_FFunction · 0.64
analyzeMethod · 0.64
existMethod · 0.64
findMethod · 0.64
TEST_FFunction · 0.64
verifyFirstUseFunction · 0.64
TEST_FFunction · 0.64
getASTDefNodeMethod · 0.64
TEST_FFunction · 0.64
TEST_FFunction · 0.64
TEST_FFunction · 0.64