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

Function GetLocationsAccessed

source/opt/loop_fusion.cpp:39–53  ·  view source on GitHub ↗

Return the set of locations accessed by |stores| and |loads|.

Source from the content-addressed store, hash-verified

37
38// Return the set of locations accessed by |stores| and |loads|.
39std::set<Instruction*> GetLocationsAccessed(
40 const std::map<Instruction*, std::vector<Instruction*>>& stores,
41 const std::map<Instruction*, std::vector<Instruction*>>& loads) {
42 std::set<Instruction*> locations{};
43
44 for (const auto& kv : stores) {
45 locations.insert(std::get<0>(kv));
46 }
47
48 for (const auto& kv : loads) {
49 locations.insert(std::get<0>(kv));
50 }
51
52 return locations;
53}
54
55// Append all dependences from |sources| to |destinations| to |dependences|.
56void GetDependences(std::vector<DistanceVector>* dependences,

Callers 1

IsLegalMethod · 0.85

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected