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

Method getBasicBlock

tests/testutil/IRAccessHelper.cpp:27–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27llvm::BasicBlock *IRAccessHelper::getBasicBlock(std::string Name,
28 unsigned BIdx) {
29 auto *F = getFunction(Name);
30 if (!F)
31 return nullptr;
32
33 auto Iter = BasicBlocks.find(F);
34 if (Iter == BasicBlocks.end())
35 return nullptr;
36
37 auto &BasicBlocks = Iter->second;
38 if (BasicBlocks.size() < BIdx)
39 return nullptr;
40
41 auto *BB = BasicBlocks[BIdx];
42 if (!BB)
43 return nullptr;
44
45 return const_cast<llvm::BasicBlock *>(BB);
46}
47
48llvm::Instruction *
49IRAccessHelper::getInstruction(std::string Name, unsigned BIdx, unsigned IIdx) {

Callers 2

TEST_FFunction · 0.80

Calls 3

endMethod · 0.80
sizeMethod · 0.80
findMethod · 0.45

Tested by 2

TEST_FFunction · 0.64