Need a pointer/link to specified LLVM instructions


I am designing a pass requiring a link/pointer to LLVM instruction so that I can track that instruction to check certain properties. I will explain the requirement using the traditional availability analysis.

In availability analysis, the information we have at the input point of a CFG block is the set of expressions (say, arithmetic expressions) available at that point ( represented using a set or bit vector ). Consider the implementation using a bit vector. If so, are there any inbuilt libraries/functions in LLVM that help me to track the corresponding LLVM instruction of the expressions available at that point? Specifically, I need the “Value” of the LLVM instruction of the expression, which is the reason for the availability at the point of our interest. If I get the “value,” I can go to that LLVM instruction and check some properties required for my pass.

Please provide some insights into this or a direction to dive deep in.

I appreciate any help you can provide.