#include <iostream>
#include <fstream>
#include <sstream>
#include "Graphs/PAG.h"
#include "Graphs/ExternalPAG.h"
#include "Util/BasicTypes.h"
#include "Graphs/ICFG.h"
Go to the source code of this file.
|
llvm::cl::list< std::string > | ExternalPAGArgs ("extpags", llvm::cl::desc("ExternalPAGs to use during PAG construction (format: func1@/path/to/graph,func2@/foo,..."), llvm::cl::CommaSeparated) |
|
llvm::cl::list< std::string > | DumpPAGFunctions ("dump-function-pags", llvm::cl::desc("Dump PAG for functions"), llvm::cl::CommaSeparated) |
|
int | getArgNo (const SVFFunction *function, const Value *arg) |
|
static void | outputPAGNodeNoNewLine (raw_ostream &o, PAGNode *pagNode) |
|
static void | outputPAGNode (raw_ostream &o, PAGNode *pagNode) |
|
static void | outputPAGNode (raw_ostream &o, PAGNode *pagNode, int argno) |
|
static void | outputPAGNode (raw_ostream &o, PAGNode *pagNode, std::string trail) |
|
static void | outputPAGEdge (raw_ostream &o, PAGEdge *pagEdge) |
|
◆ DumpPAGFunctions()
llvm::cl::list<std::string> DumpPAGFunctions |
( |
"dump-function-pags" |
, |
|
|
llvm::cl::desc("Dump PAG for functions") |
, |
|
|
llvm::cl::CommaSeparated |
|
|
) |
| |
◆ ExternalPAGArgs()
llvm::cl::list<std::string> ExternalPAGArgs |
( |
"extpags" |
| ) |
|
◆ getArgNo()
Definition at line 155 of file ExternalPAG.cpp.
158 for (
auto it = function->
getLLVMFun()->arg_begin(); it !=
function->getLLVMFun()->arg_end();
161 if (arg->getName() == it->getName())
return argNo;
Function * getLLVMFun() const
◆ outputPAGEdge()
Definition at line 196 of file ExternalPAG.cpp.
201 std::string edgeKind =
"-";
223 case PAGEdge::NormalGep:
226 case PAGEdge::VariantGep:
227 edgeKind =
"variant-gep";
232 case PAGEdge::BinaryOp:
233 edgeKind =
"binary-op";
235 case PAGEdge::UnaryOp:
236 edgeKind =
"unary-op";
238 case PAGEdge::ThreadFork:
239 outs() <<
"dump-function-pags: found ThreadFork edge.\n";
241 case PAGEdge::ThreadJoin:
242 outs() <<
"dump-function-pags: found ThreadJoin edge.\n";
246 if (NormalGepPE::classof(pagEdge)) offset =
249 o << srcId <<
" " << edgeKind <<
" " << dstId <<
" " << offset <<
"\n";
GEdgeKind getEdgeKind() const
NodeID getSrcID() const
get methods of the components
raw_ostream & outs()
Overwrite llvm::outs()
◆ outputPAGNode() [1/3]
Definition at line 175 of file ExternalPAG.cpp.
static void outputPAGNodeNoNewLine(raw_ostream &o, PAGNode *pagNode)
◆ outputPAGNode() [2/3]
Definition at line 181 of file ExternalPAG.cpp.
static void outputPAGNodeNoNewLine(raw_ostream &o, PAGNode *pagNode)
◆ outputPAGNode() [3/3]
Definition at line 188 of file ExternalPAG.cpp.
static void outputPAGNodeNoNewLine(raw_ostream &o, PAGNode *pagNode)
◆ outputPAGNodeNoNewLine()
Definition at line 167 of file ExternalPAG.cpp.
169 o << pagNode->
getId() <<
" ";
171 if (!ObjPN::classof(pagNode)) o <<
"v";
NodeID getId() const
Get ID.