Static Value-Flow Analysis
Loading...
Searching...
No Matches
Functions
wpa.cpp File Reference
#include "SVF-LLVM/LLVMUtil.h"
#include "SVF-LLVM/SVFIRBuilder.h"
#include "WPA/WPAPass.h"
#include "Util/CommandLine.h"
#include "Util/Options.h"
#include "SVFIR/SVFFileSystem.h"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Build SVFIR

Definition at line 41 of file wpa.cpp.

42{
43 auto moduleNameVec =
44 OptionBase::parseOptions(argc, argv, "Whole Program Points-to Analysis",
45 "[options] <input-bitcode...>");
46
47 // Refers to content of a singleton unique_ptr<SVFIR> in SVFIR.
48 SVFIR* pag;
49
51 {
52 pag = SVFIRReader::read(moduleNameVec.front());
53 }
54 else
55 {
56 if (Options::WriteAnder() == "ir_annotator")
57 {
59 }
60
62
64 SVFIRBuilder builder(svfModule);
65 pag = builder.build();
66
67 }
68
70 wpa.runOnModule(pag);
71
73 return 0;
74}
static std::vector< std::string > parseOptions(int argc, char *argv[], std::string description, std::string callFormat)
Definition CommandLine.h:75
static void releaseLLVMModuleSet()
Definition LLVMModule.h:129
static void preProcessBCs(std::vector< std::string > &moduleNameVec)
static SVFModule * buildSVFModule(Module &mod)
static const Option< std::string > WriteAnder
Definition Options.h:212
static const Option< bool > ReadJson
Definition Options.h:125
static SVFIR * read(const std::string &path)
virtual void runOnModule(SVFIR *svfModule)
Run pointer analysis on SVFModule.
Definition WPAPass.cpp:69
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74