[LLVMdev] [Pass] How to gather data dependencies

Valmico valmico88 at gmail.com
Wed Aug 7 13:52:43 PDT 2013


Hello,

I'm currently trying to develop new LLVM Pass that will generate simple 
data dependencies graph. For now I'm trying to get familiar with 
DependenceAnalysis.
My general idea is to traverse each function (runOnFunction) top to 
bottom Instruction by Instruction, using DA.depends( I, I2, ...) on 
every Instructions combination in function to check if they are 
dependent on any others.

Problem is that almost all (if not all) Instructions seems to be 
dependent on others even if they write/read to/from different memory cells.
Also I'm getting Dependence (confused) object, not the FullDependence, 
should i try to dynamically cast it to FullDependence, or is there a way 
to determine which Dependence instance i got other way?

Please help, I'm not an C++ nor LLVM programmer, but PHP-developer, 
however i need it done asap. If you can help just a little, give me a 
hint, i'll be very, very thankful for ANY support.

Best Regards
Valmico



More information about the llvm-dev mailing list