Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get back the Instructions from the SVF Node IDs , #1658

Open
NeyagapulaSiddhartha opened this issue Feb 16, 2025 · 5 comments
Open

How to get back the Instructions from the SVF Node IDs , #1658

NeyagapulaSiddhartha opened this issue Feb 16, 2025 · 5 comments

Comments

@NeyagapulaSiddhartha
Copy link

I am trying to write my own analysis which requires pointer analysis info llvm :: debug info and LLvm:: Instruction corresponding to a give NodeId how do i get llvm:: info .??

@yuleisui
Copy link
Collaborator

Try the toString method.

@NeyagapulaSiddhartha
Copy link
Author

NeyagapulaSiddhartha commented Feb 16, 2025

hello @yuleisui Thank you for the quick response Great Tool !! .. very usefull for my research .. could you please tell me how to use SVF in my analysis pass . Typically i want something like i have my own LLVM built from source and i have custom pass in llvm/lib/Transforms/ and i want to use flow sensitive multi threaded pointer analysis info in my custom pass

@yuleisui
Copy link
Collaborator

This will be hard as SVF uses LLVM as a library but not the other way around. I would suggest implementing your approach in SVF and you can also include any necessary LLVM headers to use their methods/public-fields within SVF.

@NeyagapulaSiddhartha
Copy link
Author

NeyagapulaSiddhartha commented Feb 18, 2025

@yuleisui thank you for the previous suggestion .. I was trying to modify the svf-ex file to write my on pass , below piece of code is giving me some errors (My main Goal is to use FSAM paper pointer analysis for parallel programs)

SVFIRBuilder builder(svfModule);
SVFIR* pag = builder.build();

PointerAnalysis* pta = SVF::FlowSensitive::createFSWPA(pag);
MTA mta;
mta.runOnModule(pag);

svf-ex: /home/SVF-tools/SVF/svf/include/MTA/TCT.h:389: bool SVF::TCT::hasJoinLoop(const SVF::CallICFGNode*) const: Assertion `tcg->getThreadAPI()->isTDJoin(join) && "not a join site"' failed.
Aborted (core dumped)

using GDB and some print statements i got to know in void ForkJoinAnalysis::handleJoin a call to hasJoinLoop(SVFUtil::cast(forkSite)) is taking a fork site as input to a join function please explain

@NeyagapulaSiddhartha
Copy link
Author

NeyagapulaSiddhartha commented Feb 18, 2025

test1.ll.txt

I ran mta pass with the above .ll file i am getting the same error ,I am using the Docker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants