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

Method DoIdsMatchFuzzy

source/diff/diff.cpp:1110–1127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1108}
1109
1110bool Differ::DoIdsMatchFuzzy(uint32_t src_id, uint32_t dst_id) {
1111 assert(dst_id != 0);
1112 const uint32_t mapped_dst_id = id_map_.MappedDstId(src_id);
1113
1114 // Consider unmatched ids as a match. In function bodies, no result id is
1115 // matched yet and thus they are excluded from instruction matching when used
1116 // as parameters in subsequent instructions.
1117 if (mapped_dst_id == 0 || mapped_dst_id == dst_id) {
1118 return true;
1119 }
1120
1121 // Int and Uint constants are interchangeable, match them in that case.
1122 if (AreIdenticalUintConstants(src_id, dst_id)) {
1123 return true;
1124 }
1125
1126 return false;
1127}
1128
1129bool Differ::DoesOperandMatchFuzzy(const opt::Operand& src_operand,
1130 const opt::Operand& dst_operand) {

Callers

nothing calls this directly

Calls 1

MappedDstIdMethod · 0.80

Tested by

no test coverage detected