Append all dependences from |sources| to |destinations| to |dependences|.
| 54 | |
| 55 | // Append all dependences from |sources| to |destinations| to |dependences|. |
| 56 | void 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|. |
| 72 | void AddInstructionsInBlock(std::vector<Instruction*>* instructions, |
no test coverage detected