mchalupa / dg

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

How to speed up the analysis of dg? #316

Open h1994st opened 4 years ago

h1994st commented 4 years ago

Hi,

I am using dg to slice a program. The size of the input bitcode is 4 MB. dg has not finished slicing the program after 17 hours.

According to the log, dg is still on the stage of PTA (see below). Indeed, my program contains lots of function pointers.

...
[9660244770][pta] Computing information about loops for the whole graph
[9660244966][pta] Computing information about loops
[9660245097][pta] Computing information about loops
[9660245149][pta] Computing information about loops
[9660245197][pta] Computing information about loops
[9660245245][pta] Computing information about loops

I am not sure whether I made any mistakes. Or are there any extensions/forked projects to improve the efficiency of dg? Or is it possible to implement a multi-thread version of PTA?

Thanks!

mchalupa commented 4 years ago

I am not sure whether I made any mistakes.

You did not, sometimes the analyses just take too much time.

Or are there any extensions/forked projects to improve the efficiency of dg?

As far as I know, there is one fork that integrates SVF project which should have more scalable (but less precise) pointer analyses. Actually, in the sdg-1.0.0 branch we have SVF integrated too, but the integration is not finished yet and is probably buggy. But you can try that and file issues so that we can fix them.

Or is it possible to implement a multi-thread version of PTA?

It is, feel free to contribute ;)

mchalupa commented 3 years ago

Hi, I have improved the data structures in PTA a bit, so you may want to try pulling new dg and trying again ;)

h1994st commented 3 years ago

Thanks! I will try it.