-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is data-dependence analysis driven by self-defined pointer analysis or SVF? #451
Comments
DG can use SVF for points-to analysis and this then propagates to data dependence analysis. If you want to use the value-flow analysis from SVF, you must do that directly via SVF API. |
To answer the question from the title: both, depends on the options you pass on the command line (and if you compile DG with SVF support). |
So I just simply need to replace |
Yes, that should do the trick, check this code: https://github.com/mchalupa/dg/blob/master/tools/llvm-pta-dump.cpp#L816 |
ok, and I want to map instructions in a bc file to the instructions they depend on. So the code for data dependence analysis is LLVMDataDependenceAnalysis DDA(M.get(), &PTA, options.dgOptions.DDAOptions);
DDA.run();
auto *SSA = static_cast<MemorySSATransformation *>(
DDA->getDDA()->getImpl());
SSA->computeAllDefinitions(); right? |
This part is important: LLVMDataDependenceAnalysis DDA(M.get(), &PTA, options.dgOptions.DDAOptions);
DDA.run(); Then you can query directly the |
So, this part auto *SSA = static_cast<MemorySSATransformation *>(
DDA->getDDA()->getImpl());
SSA->computeAllDefinitions(); is only optional? If I don't run SSA, would there be differences in the data dependence results? |
SSA is run either way, but this code makes it to compute all the results immediately (otherwise they are computed on-demand upon querying DDA object) so that There should be no differences in the results if you omit this code. |
Hi, author. I try to integrate dg into other project and when I use data-dependence analysis. I found not like
llvm-cda-dump.cpp
, inllvm-dda-dump
, there seems to be no code for leveraging SVF pointer analysis. So is there support for SVF in data-dependence analysis?The text was updated successfully, but these errors were encountered: