Comments (5)
In what form you need the data dependence? If you are just viewing the dependecies via llvm-dg-dump
, then there are these options:
Dot printer options:
--call - Print calls (default=false).
--cfgall - Print full control flow graph (default=false).
--postdom - Print post dominator tree (default=false).
--no-cfg - Do not print control flow graph (default=false).
--no-control - Do not print control dependencies (default=false).
--no-data - Do not print data dependencies (default=false).
--no-use - Do not print uses (default=false).
I guess you should be good with llvm-dda-dump
that dumps precisely the data dependence (also to dot).
For slicing (llvm-slicer
), it is not possible to omit control dependence as the resulting bitcode would be malformed. But you can use -annotate=dd
to generate an annotated debug file where you can see the data dependence.
from dg.
Thanks a lot. Let me try.
In fact, I only need all the data-dependent lines of a given line in the function.
from dg.
I don't really understand the results.
I run ./llvm-dda-dump --entry=do_mount -c do_new_mount namespace_tag/built-in_tag.bc > dda_result, trying to find the dependent lines of do_new_mount(......) in do_mount(), https://elixir.bootlin.com/linux/v5.5-rc5/source/fs/namespace.c#L3142
I have two questions:
- The results are really long, it seems that the tool doesn't only analyze function do_mount() but also a lot of other functions, is it normal?
- It seems that it doesn't show any dependent lines of do_new_mount() function call. What's the reason?
from dg.
The results are really long, it seems that the tool doesn't only analyze function do_mount() but also a lot of other functions, is it normal?
Yes, the analysis is interprocedural and all the functions that can be (transitively) called from do_mount
are analyzed.
It seems that it doesn't show any dependent lines of do_new_mount() function call. What's the reason?
The call has no data dependence, its arguments do.
btw. llvm-dda-dump
has also a switch -c-lines
.
from dg.
Since there have been multiple needs for such a functionality in the past, I quickly hacked a tool that gives you only the data (or control) dependence for a given instruction/line. It is in this branch for now: https://github.com/mchalupa/dg/tree/llvm-dg-deps .
You can use it as:
llvm-dg-deps -data '3142#' bitcode.bc
The format for -data
is the same as for -sc
. The output is not polished anyhow, but I hope this still helps.
from dg.
Related Issues (20)
- install error HOT 11
- 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
- Is data-dependence analysis driven by self-defined pointer analysis or SVF? HOT 8
- 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
- How to use DG in an LLVM Pass? HOT 4
- Question about Multilingual Support HOT 2
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.