Getting closer of consumers/providers of a llvm instruction

Hi

Analyzing llvm IR file is it possible to get the closer of consumers/providers of a llvm instruction - are there llvm functions that allow, for every instruction, to determine the list of all instructions that affect it execution ( not necessarily directly ) and list of all instructions that are affected by it execution ( again, not necessarily directly ).
Knowing the consumers/providers of an instruction make it possible to calculate such a data. The question is if it is already calculated and, if yes, how to obtain it.

Thank you,

David