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 "MTA/MTAStat.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 62 of file mta.cpp.

63{
64 std::vector<std::string> moduleNameVec = OptionBase::parseOptions(
65 argc, argv, "MTA Analysis", "[options] <input-bitcode...>");
66
69 SVFIR* pag = builder.build();
70
71 // MTA's only client is race detection. -mta-flow-sensitive (default) selects the
72 // FSAM pipeline (SlicedMTA), which decides slicing and the pre-analysis
73 // context handling internally; otherwise run the flow-insensitive Andersen
74 // detector.
75 bool succeeded = true;
77 {
78 AndersenWaveDiff* preAnalysis = preparePreAnalysis(pag, builder);
80 succeeded = sliced.runOnModule(pag, *preAnalysis);
81 }
82 else
83 {
84 MTA mta;
86 }
87
91 return succeeded ? 0 : 1;
92}
static std::vector< std::string > parseOptions(int argc, char *argv[], std::string description, std::string callFormat)
Definition CommandLine.h:75
static void releaseAndersenWaveDiff()
Definition Andersen.h:418
static void releaseLLVMModuleSet()
Definition LLVMModule.h:140
static void buildSVFModule(Module &mod)
Definition MTA.h:81
virtual bool runOnModule(SVFIR *module)
We start the pass here.
Definition MTA.cpp:67
static const Option< bool > MTFlowSensitive
MTA: flow-sensitive (FSAM) main analysis; false = Andersen flow-insensitive base, Default: true.
Definition Options.h:256
static void releaseSVFIR()
Definition SVFIR.h:128
bool runOnModule(SVFIR *pag, AndersenWaveDiff &preAnalysis)
Run the slicing pipeline with its prepared Andersen pre-analysis.
Definition MTA.cpp:1276
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:76