MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / GetFunctionHeader

Method GetFunctionHeader

source/diff/diff.cpp:1616–1631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1614}
1615
1616InstructionList Differ::GetFunctionHeader(const opt::Function& function) {
1617 // Go over the instructions of the function and add the header instructions to
1618 // a flat list to simplify diff generation.
1619 InstructionList body;
1620 function.WhileEachInst(
1621 [&body](const opt::Instruction* inst) {
1622 if (inst->opcode() == spv::Op::OpLabel) {
1623 return false;
1624 }
1625 body.push_back(inst);
1626 return true;
1627 },
1628 true, true);
1629
1630 return body;
1631}
1632
1633void Differ::GetFunctionBodies(opt::IRContext* context, FunctionMap* functions,
1634 FunctionInstMap* function_insts) {

Callers

nothing calls this directly

Calls 3

WhileEachInstMethod · 0.45
opcodeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected