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

Method MappedInstImpl

source/diff/diff.cpp:2636–2651  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2634}
2635
2636const opt::Instruction* Differ::MappedInstImpl(
2637 const opt::Instruction* inst, const IdMap& to_other,
2638 const IdInstructions& other_id_to) {
2639 if (inst->HasResultId()) {
2640 if (to_other.IsMapped(inst->result_id())) {
2641 const uint32_t other_result_id = to_other.MappedId(inst->result_id());
2642
2643 assert(other_result_id < other_id_to.inst_map_.size());
2644 return other_id_to.inst_map_[other_result_id];
2645 }
2646
2647 return nullptr;
2648 }
2649
2650 return to_other.MappedInst(inst);
2651}
2652
2653void Differ::OutputLine(std::function<bool()> are_lines_identical,
2654 std::function<void()> output_src_line,

Callers

nothing calls this directly

Calls 6

HasResultIdMethod · 0.80
IsMappedMethod · 0.80
MappedIdMethod · 0.80
MappedInstMethod · 0.80
result_idMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected