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

Method MatchTypeForwardPointersByName

source/diff/diff.cpp:1551–1566  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1549}
1550
1551void Differ::MatchTypeForwardPointersByName(const IdGroup& src,
1552 const IdGroup& dst) {
1553 // Given two sets of compatible groups of OpTypeForwardPointer instructions,
1554 // attempts to match them by name.
1555
1556 // Group them by debug info and loop over them.
1557 GroupIdsAndMatch<std::string>(
1558 src, dst, "", &Differ::GetSanitizedName,
1559 [this](const IdGroup& src_group, const IdGroup& dst_group) {
1560 // Match only if there's a unique forward declaration with this debug
1561 // name.
1562 if (src_group.size() == 1 && dst_group.size() == 1) {
1563 id_map_.MapIds(src_group[0], dst_group[0]);
1564 }
1565 });
1566}
1567
1568void Differ::MatchTypeForwardPointersByTypeOp(const IdGroup& src,
1569 const IdGroup& dst) {

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
MapIdsMethod · 0.45

Tested by

no test coverage detected