Static Value-Flow Analysis
Loading...
Searching...
No Matches
Functions
mta.cpp File Reference
#include "SVF-LLVM/LLVMUtil.h"
#include "SVF-LLVM/SVFIRBuilder.h"
#include "MTA/MTA.h"
#include "Util/CommandLine.h"
#include "Util/Options.h"
#include <string>
#include <vector>

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 36 of file mta.cpp.

37{
38 std::vector<std::string> moduleNameVec = OptionBase::parseOptions(
39 argc, argv, "MTA Analysis", "[options] <input-bitcode...>");
40
43 SVFIR* pag = builder.build();
44
45 // MTA's only client is race detection. -mta-flow-sensitive (default) selects the
46 // FSAM pipeline (SlicedMTA), which decides slicing and the pre-analysis
47 // context handling internally; otherwise run the flow-insensitive Andersen
48 // detector.
50 {
51 // The only LLVM-dependent step -- materialising resolved indirect calls
52 // into the PAG -- is injected here.
55 {
56 builder.updateCallGraph(cg);
57 });
58 }
59 else
60 {
61 MTA mta;
62 mta.runOnModule(pag);
63 }
64
66 return 0;
67}
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:140
static void buildSVFModule(Module &mod)
Definition MTA.h:86
virtual bool runOnModule(SVFIR *module)
We start the pass here.
Definition MTA.cpp:75
static const Option< bool > MTFlowSensitive
MTA: flow-sensitive (FSAM) main analysis; false = Andersen flow-insensitive base, Default: true.
Definition Options.h:256
void runOnModule(SVFIR *pag, const ResolveIndirectCalls &resolveIndirectCalls)
Run the slicing pipeline on a pre-built SVFIR.
Definition MTA.cpp:998
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:76