When working with the DDG it's useful to be able to query details of the memory dependencies between two nodes connected by a memory edge. The DDG does not hold a copy of the dependencies, but it contains a reference to a DependenceInfo object through which dependence information can be queried. This patch adds a query function to the DDG to obtain all the Dependence objects that exist between instructions of two nodes.
The same function has also been proposed under https://reviews.llvm.org/D73801, but since the review may take loner we'd like to add this query function as a separate revision here to unblock other uses of the DDG.
clang-format: please reformat the code