mchalupa / dg

[LLVM Static Slicer] Various program analyses, construction of dependence graphs and program slicing of LLVM bitcode.
MIT License
474 stars 131 forks source link

The dependence graph doesn't have nodes. #421

Closed huang429 closed 2 years ago

huang429 commented 2 years ago

Dear Professor ,
I happen to be doing the work about analysis dependencies between data,and found your awesome job. I have installed the DG environment. I tryed to use the llvm-dg-dump tools,but the graph I received doesn't have any nodes.When I running the tests,the command is ./llvm-dg-dump tests/schedule2/schedule2.bc > tests/schedule2/schedule2.dot ,and the graph is that digraph "DependenceGraph" { compound=true label="Graph 0x1105d80 has 77 nodes\n dd edges color: cyan4 use edges color: black, dashed cd edges color: blue cfg edges color: gray" } Does the tool not work now?Or how should I modify the command?

mchalupa commented 2 years ago

Can you provide more information? Are there any error messages? What is the analyzed program?

huang429 commented 2 years ago

你能提供更多信息吗?是否有任何错误消息?分析的程序是什么?

When I input the command ,there isn't any errors. I use different programs for test. The program is that, _#include

include

include

long int fact(int x) { long int r = x; while (x >= 2){ x = x - 1; r *= x; }

return r;

}

int main(int argc, char **argv) { int a = atoi(argv[1]); int b = atoi(argv[2]); if(a > 0){ printf("fact: %lu\n", fact(b)); } return 0; }_

And my graph is _digraph "DependenceGraph" { compound=true label="Graph 0x248a5a0 has 26 nodes\n dd edges color: cyan4 use edges color: black, dashed cd edges color: blue cfg edges color: gray"

}_

I used llvm-6.0.1.I read the DG tools need llvm-3.4 between 3.9,but when I used llvm-3.4,there are errors that "no matching functions from .. to .." during installing the tools.

mchalupa commented 2 years ago

This is a bug introduced in bca480ecd5455.

huang429 commented 2 years ago

This is a bug introduced in bca480e.

Thanks very much.I will try again.