Git Product home page Git Product logo

Comments (8)

mchalupa avatar mchalupa commented on June 2, 2024

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.

mchalupa avatar mchalupa commented on June 2, 2024

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.

for-just-we avatar for-just-we commented on June 2, 2024

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.

mchalupa avatar mchalupa commented on June 2, 2024

Yes, that should do the trick, check this code: https://github.com/mchalupa/dg/blob/master/tools/llvm-pta-dump.cpp#L816

from dg.

for-just-we avatar for-just-we commented on June 2, 2024

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.

mchalupa avatar mchalupa commented on June 2, 2024

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.

for-just-we avatar for-just-we commented on June 2, 2024

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.

mchalupa avatar mchalupa commented on June 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.