Comments (8)
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.
from dg.
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).
from dg.
data
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.
So I just simply need to replace DGLLVMPointerAnalysis
with SVFPointerAnalysis
?
from dg.
Yes, that should do the trick, check this code: https://github.com/mchalupa/dg/blob/master/tools/llvm-pta-dump.cpp#L816
from dg.
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?
from dg.
This part is important:
LLVMDataDependenceAnalysis DDA(M.get(), &PTA, options.dgOptions.DDAOptions);
DDA.run();
Then you can query directly the DDA
object for the definitions.
from dg.
This part is important:
LLVMDataDependenceAnalysis DDA(M.get(), &PTA, options.dgOptions.DDAOptions); DDA.run();Then you can query directly the
DDA
object for the definitions.
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?
from dg.
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 llvm-dda-dump
can show dump all the results including some internal information obtained from the SSA object.
There should be no differences in the results if you omit this code.
from dg.
Related Issues (20)
- How to `llvm-to-source` a `.sliced` file that is obtained from a linked bitcode file HOT 2
- How to slice the following c++ file? HOT 3
- install error HOT 11
- Slice results only from DDG HOT 5
- the results of slicing seems wrong HOT 5
- version of SVF used HOT 5
- How to slice the program accurately HOT 12
- Address boundary error when building dg graph in Make 4.2 HOT 4
- llvm-slicer hangs somewhere when slicing sqlite-3.38.0 HOT 6
- Intra-procedural slicing HOT 1
- Crash and Assertion `use_empty() && "Uses remain when a value is destroyed!"' failed. HOT 4
- Slice process is blocked HOT 9
- Please update SVFPointerAnalysis.h in dg due to SVF updated. HOT 2
- [Question] Is it possible to use dg to slice and analyze Linux source code? HOT 3
- Build failed HOT 6
- Can DG only do data dependency analysis without program slicing? HOT 1
- Support LLVM 18
- pta-show tool not working due to llvm-pta-dump incorrect dot syntax output HOT 1
- It there any way to preserve instructions depends on or depended by sliced criterions? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dg.