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

Function GetDependences

source/opt/loop_fusion.cpp:56–69  ·  view source on GitHub ↗

Append all dependences from |sources| to |destinations| to |dependences|.

Source from the content-addressed store, hash-verified

54
55// Append all dependences from |sources| to |destinations| to |dependences|.
56void GetDependences(std::vector<DistanceVector>* dependences,
57 LoopDependenceAnalysis* analysis,
58 const std::vector<Instruction*>& sources,
59 const std::vector<Instruction*>& destinations,
60 size_t num_entries) {
61 for (auto source : sources) {
62 for (auto destination : destinations) {
63 DistanceVector dist(num_entries);
64 if (!analysis->GetDependence(source, destination, &dist)) {
65 dependences->push_back(dist);
66 }
67 }
68 }
69}
70
71// Apped all instructions in |block| to |instructions|.
72void AddInstructionsInBlock(std::vector<Instruction*>* instructions,

Callers 1

IsLegalMethod · 0.85

Calls 2

GetDependenceMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected