MCPcopy Create free account
hub / github.com/AliveToolkit/alive2 / addInstrAt

Method addInstrAt

ir/function.cpp:50–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50void BasicBlock::addInstrAt(unique_ptr<Instr> &&i, const Instr *other,
51 bool before) {
52 for (auto I = m_instrs.begin(); true; ++I) {
53 assert(I != m_instrs.end());
54 if (I->get() == other) {
55 if (!before)
56 ++I;
57 m_instrs.emplace(I, std::move(i));
58 break;
59 }
60 }
61}
62
63void BasicBlock::delInstr(const Instr *i) {
64 for (auto I = m_instrs.begin(), E = m_instrs.end(); I != E; ++I) {

Callers 5

alive_parser.cppFile · 0.80
unrollMethod · 0.80
convert_constexprMethod · 0.80
copy_inserterMethod · 0.80
handleMetadataMethod · 0.80

Calls 3

beginMethod · 0.45
endMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected