#include <SVFStatements.h>
|
| enum | PEDGEK {
Addr
, Copy
, Store
, Load
,
Call
, Ret
, Gep
, Phi
,
Select
, Cmp
, BinaryOp
, UnaryOp
,
Branch
, ThreadFork
, ThreadJoin
} |
| typedef GenericNode< SVFVar, SVFStmt >::GEdgeSetTy | SVFStmtSetTy |
| typedef Map< EdgeID, SVFStmtSetTy > | PAGEdgeToSetMapTy |
| typedef PAGEdgeToSetMapTy | KindToSVFStmtMapTy |
| typedef SVFStmtSetTy | PAGEdgeSetTy |
| typedef SVFVar | NodeType |
| | Node type.
|
| typedef u64_t | GEdgeFlag |
| typedef s64_t | GEdgeKind |
| typedef struct SVF::GenericEdge::equalGEdge | equalGEdge |
| | Add the hash function for std::set (we also can overload operator< to implement this).
|
Definition at line 55 of file SVFStatements.h.
◆ Inst2LabelMap
◆ KindToSVFStmtMapTy
◆ PAGEdgeSetTy
◆ PAGEdgeToSetMapTy
◆ SVFStmtSetTy
◆ Var2LabelMap
◆ PEDGEK
Types of SVFIR statements Gep represents (base + offset) for field sensitivity ThreadFork/ThreadJoin is to model parameter passings between thread spawners and spawnees.
| Enumerator |
|---|
| Addr | |
| Copy | |
| Store | |
| Load | |
| Call | |
| Ret | |
| Gep | |
| Phi | |
| Select | |
| Cmp | |
| BinaryOp | |
| UnaryOp | |
| Branch | |
| ThreadFork | |
| ThreadJoin | |
Definition at line 64 of file SVFStatements.h.
◆ SVFStmt() [1/3]
Private constructor for reading SVFIR from file without side-effect.
Definition at line 91 of file SVFStatements.h.
93 {
94 }
ICFGNode * icfgNode
ICFGNode.
const SVFBasicBlock * basicBlock
LLVM BasicBlock.
const SVFVar * value
LLVM value.
GenericEdge< SVFVar > GenericPAGEdgeTy
◆ SVFStmt() [2/3]
Definition at line 58 of file SVFStatements.cpp.
58 :
60{
61 if(real)
62 {
65 }
66}
static SVFIR * getPAG(bool buildFromFile=false)
Singleton design here to make sure we only have one instance during any analysis.
◆ SVFStmt() [3/3]
Constructor.
SVFStmt constructor
Definition at line 48 of file SVFStatements.cpp.
48 :
50{
51 if(real)
52 {
55 }
56}
u32_t getTotalEdgeNum() const
◆ ~SVFStmt()
| SVF::SVFStmt::~SVFStmt |
( |
| ) |
|
|
inline |
◆ addInst2Labeled()
| void SVF::SVFStmt::addInst2Labeled |
( |
const ICFGNode * | cs, |
|
|
u32_t | label ) |
|
inlinestaticprotected |
Add a call site Instruction to label mapping, this is used when loading statements from DB
Definition at line 133 of file SVFStatements.h.
134 {
136 }
static Inst2LabelMap inst2LabelMap
Call site Instruction to label map.
◆ addVar2Labeled()
| void SVF::SVFStmt::addVar2Labeled |
( |
const SVFVar * | var, |
|
|
u32_t | label ) |
|
inlinestaticprotected |
Definition at line 138 of file SVFStatements.h.
139 {
141 }
static Var2LabelMap var2LabelMap
Second operand of MultiOpndStmt to label map.
◆ classof() [1/2]
◆ classof() [2/2]
| bool SVF::SVFStmt::classof |
( |
const SVFStmt * | | ) |
|
|
inlinestatic |
◆ getBB()
◆ getCallEdgeLabelCounter()
| const u64_t * SVF::SVFStmt::getCallEdgeLabelCounter |
( |
| ) |
|
|
inlinestatic |
Definition at line 287 of file SVFStatements.h.
288 {
290 }
static u64_t callEdgeLabelCounter
Call site Instruction counter.
◆ getEdgeID()
| EdgeID SVF::SVFStmt::getEdgeID |
( |
| ) |
const |
|
inline |
◆ getICFGNode()
| ICFGNode * SVF::SVFStmt::getICFGNode |
( |
| ) |
const |
|
inline |
◆ getInst2LabelMap()
◆ getMultiOpndLabelCounter()
| const u64_t * SVF::SVFStmt::getMultiOpndLabelCounter |
( |
| ) |
|
|
inlinestatic |
Definition at line 297 of file SVFStatements.h.
298 {
300 }
static u64_t multiOpndLabelCounter
MultiOpndStmt counter.
◆ getStoreEdgeLabelCounter()
| const u64_t * SVF::SVFStmt::getStoreEdgeLabelCounter |
( |
| ) |
|
|
inlinestatic |
Definition at line 292 of file SVFStatements.h.
293 {
295 }
static u64_t storeEdgeLabelCounter
Store Instruction counter.
◆ getValue()
| const SVFVar * SVF::SVFStmt::getValue |
( |
| ) |
const |
|
inline |
◆ getVar2LabelMap()
◆ isPTAEdge()
| bool SVFStmt::isPTAEdge |
( |
| ) |
const |
|
virtual |
Whether src and dst nodes are both of pointer type.
Whether src and dst nodes are both pointer type
Reimplemented in SVF::AddrStmt.
Definition at line 71 of file SVFStatements.cpp.
72{
74}
NodeType * getSrcNode() const
NodeType * getDstNode() const
virtual bool isPointer() const
Check if this variable represents a pointer.
◆ makeEdgeFlagWithAddionalOpnd()
Compute the unique edgeFlag value from edge kind and second variable operand for MultiOpndStmt.
Definition at line 216 of file SVFStatements.h.
218 {
220 if (it_inserted.second)
222 u64_t label = it_inserted.first->second;
224 }
static constexpr unsigned char EdgeKindMaskBits
◆ makeEdgeFlagWithCallInst()
Compute the unique edgeFlag value from edge kind and call site Instruction.
Definition at line 228 of file SVFStatements.h.
230 {
232 if (it_inserted.second)
234 u64_t label = it_inserted.first->second;
236 }
◆ makeEdgeFlagWithStoreInst()
Compute the unique edgeFlag value from edge kind and store Instruction. Two store instructions may share the same StorePAGEdge
Definition at line 240 of file SVFStatements.h.
242 {
244 if (it_inserted.second)
246 u64_t label = it_inserted.first->second;
248 }
◆ setBasicBlock()
◆ setBB()
◆ setCallEdgeLabelCounter()
| void SVF::SVFStmt::setCallEdgeLabelCounter |
( |
u64_t | counter | ) |
|
|
inlineprotected |
set the call edge lanbel counter for the new statements, this is used when loading statements from DB
Definition at line 109 of file SVFStatements.h.
◆ setICFGNode()
| void SVF::SVFStmt::setICFGNode |
( |
ICFGNode * | node | ) |
|
|
inline |
◆ setMultiOpndLabelCounter()
| void SVF::SVFStmt::setMultiOpndLabelCounter |
( |
u64_t | counter | ) |
|
|
inlineprotected |
set the multi operand edge lanbel counter for the new statements, this is used when loading statements from DB
Definition at line 125 of file SVFStatements.h.
◆ setStoreEdgeLabelCounter()
| void SVF::SVFStmt::setStoreEdgeLabelCounter |
( |
u64_t | counter | ) |
|
|
inlineprotected |
set the store edge lanbel counter for the new statements, this is used when loading statements from DB
Definition at line 117 of file SVFStatements.h.
◆ setValue()
| void SVF::SVFStmt::setValue |
( |
const SVFVar * | val | ) |
|
|
inline |
◆ toString()
| const std::string SVFStmt::toString |
( |
| ) |
const |
|
virtual |
Reimplemented in SVF::AddrStmt, SVF::AssignStmt, SVF::BinaryOPStmt, SVF::BranchStmt, SVF::CallPE, SVF::CmpStmt, SVF::CopyStmt, SVF::GepStmt, SVF::LoadStmt, SVF::PhiStmt, SVF::RetPE, SVF::SelectStmt, SVF::StoreStmt, SVF::TDForkPE, SVF::TDJoinPE, and SVF::UnaryOPStmt.
Definition at line 76 of file SVFStatements.cpp.
77{
78 std::string str;
79 std::stringstream rawstr(str);
80 rawstr <<
"SVFStmt: [Var" <<
getDstID() <<
" <-- Var" <<
getSrcID() <<
"]\t";
81 return rawstr.str();
82}
◆ GraphDBClient
| friend class GraphDBClient |
|
friend |
◆ operator<<
Overloading operator << for dumping SVFVar value.
Definition at line 255 of file SVFStatements.h.
256 {
257 o << edge.toString();
258 return o;
259 }
◆ basicBlock
◆ callEdgeLabelCounter
| u64_t SVFStmt::callEdgeLabelCounter = 0 |
|
staticprivate |
◆ edgeId
◆ icfgNode
◆ inst2LabelMap
◆ multiOpndLabelCounter
| u64_t SVFStmt::multiOpndLabelCounter = 0 |
|
staticprivate |
◆ storeEdgeLabelCounter
| u64_t SVFStmt::storeEdgeLabelCounter = 0 |
|
staticprivate |
◆ value
| const SVFVar* SVF::SVFStmt::value |
|
private |
◆ var2LabelMap
The documentation for this class was generated from the following files: