Static Value-Flow Analysis
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
SVF::FunObjVar Class Reference

#include <SVFVariables.h>

Inheritance diagram for SVF::FunObjVar:
SVF::BaseObjVar SVF::ObjVar SVF::SVFVar SVF::GenericNode< NodeTy, EdgeTy > SVF::SVFValue

Public Types

typedef SVFLoopAndDomInfo::BBSet BBSet
 
typedef SVFLoopAndDomInfo::BBList BBList
 
typedef SVFLoopAndDomInfo::LoopBBs LoopBBs
 
typedef BasicBlockGraph::IDToNodeMapTy::const_iterator const_bb_iterator
 
- Public Types inherited from SVF::SVFVar
typedef GNodeK PNODEK
 
typedef s64_t GEdgeKind
 
- Public Types inherited from SVF::GenericNode< NodeTy, EdgeTy >
typedef NodeTy NodeType
 
typedef EdgeTy EdgeType
 
typedef OrderedSet< EdgeType *, typename EdgeType::equalGEdge > GEdgeSetTy
 Edge kind.
 
typedef GEdgeSetTy::iterator iterator
 
typedef GEdgeSetTy::const_iterator const_iterator
 
- Public Types inherited from SVF::SVFValue
enum  GNodeK {
  IntraBlock , GlobalBlock , FunEntryBlock , FunExitBlock ,
  FunCallBlock , FunRetBlock , ValNode , ArgValNode ,
  FunValNode , GepValNode , RetValNode , VarargValNode ,
  GlobalValNode , ConstAggValNode , ConstDataValNode , BlackHoleValNode ,
  ConstFPValNode , ConstIntValNode , ConstNullptrValNode , DummyValNode ,
  ObjNode , GepObjNode , BaseObjNode , FunObjNode ,
  HeapObjNode , StackObjNode , GlobalObjNode , ConstAggObjNode ,
  ConstDataObjNode , ConstFPObjNode , ConstIntObjNode , ConstNullptrObjNode ,
  DummyObjNode , Cmp , BinaryOp , UnaryOp ,
  Branch , DummyVProp , NPtr , FRet ,
  ARet , AParm , FParm , Addr ,
  Copy , Gep , Store , Load ,
  TPhi , TIntraPhi , TInterPhi , FPIN ,
  FPOUT , APIN , APOUT , MPhi ,
  MIntraPhi , MInterPhi , CallNodeKd , CDNodeKd ,
  CFLNodeKd , CHNodeKd , ConstraintNodeKd , TCTNodeKd ,
  DCHNodeKd , BasicBlockKd , OtherKd
}
 

Public Member Functions

 FunObjVar (NodeID i, ObjTypeInfo *ti, const ICFGNode *node)
 Constructor.
 
virtual ~FunObjVar ()
 
void initFunObjVar (bool decl, bool intrinc, bool addr, bool uncalled, bool notret, bool vararg, const SVFFunctionType *ft, SVFLoopAndDomInfo *ld, const FunObjVar *real, BasicBlockGraph *bbg, const std::vector< const ArgValVar * > &allarg, const SVFBasicBlock *exit)
 
void setRelDefFun (const FunObjVar *real)
 
virtual const FunObjVargetFunction () const
 Get containing function, or null for globals/constants.
 
void addArgument (const ArgValVar *arg)
 
bool isDeclaration () const
 
bool isIntrinsic () const
 
bool hasAddressTaken () const
 
bool isVarArg () const
 
bool isUncalledFunction () const
 
bool hasReturn () const
 
const SVFFunctionTypegetFunctionType () const
 Returns the FunctionType.
 
const SVFTypegetReturnType () const
 Returns the FunctionType.
 
SVFLoopAndDomInfogetLoopAndDomInfo () const
 
const std::vector< const SVFBasicBlock * > & getReachableBBs () const
 
void getExitBlocksOfLoop (const SVFBasicBlock *bb, BBList &exitbbs) const
 
bool hasLoopInfo (const SVFBasicBlock *bb) const
 
const LoopBBsgetLoopInfo (const SVFBasicBlock *bb) const
 
const SVFBasicBlockgetLoopHeader (const BBList &lp) const
 
bool loopContainsBB (const BBList &lp, const SVFBasicBlock *bb) const
 
const Map< const SVFBasicBlock *, BBSet > & getDomTreeMap () const
 
const Map< const SVFBasicBlock *, BBSet > & getDomFrontierMap () const
 
bool isLoopHeader (const SVFBasicBlock *bb) const
 
bool dominate (const SVFBasicBlock *bbKey, const SVFBasicBlock *bbValue) const
 
bool postDominate (const SVFBasicBlock *bbKey, const SVFBasicBlock *bbValue) const
 
const FunObjVargetDefFunForMultipleModule () const
 
void setBasicBlockGraph (BasicBlockGraph *graph)
 
BasicBlockGraphgetBasicBlockGraph ()
 
const BasicBlockGraphgetBasicBlockGraph () const
 
bool hasBasicBlock () const
 
const SVFBasicBlockgetEntryBlock () const
 
const SVFBasicBlockgetExitBB () const
 
void setExitBlock (SVFBasicBlock *bb)
 
u32_t arg_size () const
 
const ArgValVargetArg (u32_t idx) const
 
const SVFBasicBlockfront () const
 
const SVFBasicBlockback () const
 
const_bb_iterator begin () const
 
const_bb_iterator end () const
 
virtual bool isIsolatedNode () const
 Check if this node is isolated (no edges) in the SVFIR graph.
 
virtual const std::string toString () const
 Get string representation.
 
- Public Member Functions inherited from SVF::BaseObjVar
 BaseObjVar (NodeID i, ObjTypeInfo *ti, const ICFGNode *node, PNODEK ty=BaseObjNode)
 Constructor.
 
virtual const BaseObjVargetBaseMemObj () const
 
const ObjTypeInfogetTypeInfo () const
 
ObjTypeInfogetTypeInfo ()
 
const ICFGNodegetICFGNode () const
 Get the ICFGNode related to the creation of this object.
 
void setICFGNode (const ICFGNode *node)
 
const std::string getValueName () const
 Return name of a LLVM value.
 
NodeID getId () const
 Get the memory object id.
 
const SVFTypegetType () const
 Get obj type.
 
u32_t getNumOfElements () const
 Get the number of elements of this object.
 
void setNumOfElements (u32_t num)
 Set the number of elements of this object.
 
u32_t getMaxFieldOffsetLimit () const
 Get max field offset limit.
 
bool isFieldInsensitive () const
 Return true if its field limit is 0.
 
void setFieldInsensitive ()
 Set the memory object to be field insensitive.
 
void setFieldSensitive ()
 Set the memory object to be field sensitive (up to max field limit)
 
bool isBlackHoleObj () const
 Whether it is a black hole object.
 
u32_t getByteSizeOfObj () const
 Get the byte size of this object.
 
bool isConstantByteSize () const
 Check if byte size is a const value.
 
bool isFunction () const
 object attributes methods
 
bool isGlobalObj () const
 
bool isStaticObj () const
 
bool isStack () const
 
bool isHeap () const
 
bool isStruct () const
 
bool isArray () const
 
bool isVarStruct () const
 
bool isVarArray () const
 
bool isConstantStruct () const
 
bool isConstantArray () const
 
bool isConstDataOrConstGlobal () const
 
virtual bool isConstDataOrAggData () const
 Check if this variable represents constant/aggregate data.
 
void destroy ()
 Clean up memory.
 
- Public Member Functions inherited from SVF::ObjVar
std::string getObjVarNodeFieldsStmt () const
 
- Public Member Functions inherited from SVF::SVFVar
 SVFVar (NodeID i, const SVFType *svfType, PNODEK k)
 Standard constructor with ID, type and kind.
 
virtual ~SVFVar ()
 Virtual destructor.
 
virtual bool isPointer () const
 Check if this variable represents a pointer.
 
virtual bool isConstDataOrAggDataButNotNullPtr () const
 Check if this variable represents constant data/metadata but not null pointer.
 
SVFStmt::SVFStmtSetTygetIncomingEdges (SVFStmt::PEDGEK kind)
 Edge accessors and checkers.
 
SVFStmt::SVFStmtSetTygetOutgoingEdges (SVFStmt::PEDGEK kind)
 
bool hasIncomingEdges (SVFStmt::PEDGEK kind) const
 
bool hasOutgoingEdges (SVFStmt::PEDGEK kind) const
 
SVFStmt::SVFStmtSetTy::iterator getIncomingEdgesBegin (SVFStmt::PEDGEK kind) const
 Edge iterators.
 
SVFStmt::SVFStmtSetTy::iterator getIncomingEdgesEnd (SVFStmt::PEDGEK kind) const
 
SVFStmt::SVFStmtSetTy::iterator getOutgoingEdgesBegin (SVFStmt::PEDGEK kind) const
 
SVFStmt::SVFStmtSetTy::iterator getOutgoingEdgesEnd (SVFStmt::PEDGEK kind) const
 
virtual bool ptrInUncalledFunction () const
 Check if this pointer is in an uncalled function.
 
void dump () const
 Debug dump to console.
 
- Public Member Functions inherited from SVF::GenericNode< NodeTy, EdgeTy >
 GenericNode (NodeID i, GNodeK k, const SVFType *svfType=nullptr)
 Constructor.
 
virtual ~GenericNode ()
 Destructor.
 
bool hasIncomingEdge () const
 Has incoming/outgoing edge set.
 
bool hasOutgoingEdge () const
 
iterator OutEdgeBegin ()
 iterators
 
iterator OutEdgeEnd ()
 
iterator InEdgeBegin ()
 
iterator InEdgeEnd ()
 
const_iterator OutEdgeBegin () const
 
const_iterator OutEdgeEnd () const
 
const_iterator InEdgeBegin () const
 
const_iterator InEdgeEnd () const
 
virtual iterator directOutEdgeBegin ()
 Iterators used for SCC detection, overwrite it in child class if necessary.
 
virtual iterator directOutEdgeEnd ()
 
virtual iterator directInEdgeBegin ()
 
virtual iterator directInEdgeEnd ()
 
virtual const_iterator directOutEdgeBegin () const
 
virtual const_iterator directOutEdgeEnd () const
 
virtual const_iterator directInEdgeBegin () const
 
virtual const_iterator directInEdgeEnd () const
 
bool addIncomingEdge (EdgeType *inEdge)
 Add incoming and outgoing edges.
 
bool addOutgoingEdge (EdgeType *outEdge)
 
EdgeTypehasIncomingEdge (EdgeType *edge) const
 Find incoming and outgoing edges.
 
EdgeTypehasOutgoingEdge (EdgeType *edge) const
 
const GEdgeSetTygetOutEdges () const
 
const GEdgeSetTygetInEdges () const
 
u32_t removeIncomingEdge (EdgeType *edge)
 
u32_t removeOutgoingEdge (EdgeType *edge)
 
- Public Member Functions inherited from SVF::SVFValue
 SVFValue (NodeID i, GNodeK k, const SVFType *ty=nullptr)
 
NodeID getId () const
 Get ID.
 
GNodeK getNodeKind () const
 Get node kind.
 
virtual void setName (const std::string &nameInfo)
 
virtual void setName (std::string &&nameInfo)
 
virtual const std::string & getName () const
 
virtual void setSourceLoc (const std::string &sourceCodeInfo)
 
virtual const std::string getSourceLoc () const
 
const std::string valueOnlyToString () const
 
const bool hasLLVMValue () const
 

Static Public Member Functions

static bool classof (const FunObjVar *)
 a 'single' basic block having no successors and containing return instruction in a function
 
static bool classof (const BaseObjVar *node)
 
static bool classof (const ObjVar *node)
 
static bool classof (const SVFVar *node)
 
static bool classof (const GenericPAGNodeTy *node)
 
static bool classof (const SVFValue *node)
 
- Static Public Member Functions inherited from SVF::BaseObjVar
static bool classof (const BaseObjVar *)
 ICFGNode related to the creation of this object.
 
static bool classof (const ObjVar *node)
 
static bool classof (const SVFVar *node)
 
static bool classof (const GenericPAGNodeTy *node)
 
static bool classof (const SVFValue *node)
 
- Static Public Member Functions inherited from SVF::ObjVar
static bool classof (const ObjVar *)
 Methods for support type inquiry through isa, cast, and dyn_cast:
 
static bool classof (const SVFVar *node)
 
static bool classof (const GenericPAGNodeTy *node)
 
static bool classof (const SVFValue *node)
 
- Static Public Member Functions inherited from SVF::SVFVar
static bool classof (const SVFVar *)
 Type checking support for LLVM-style RTTI.
 
static bool classof (const GenericPAGNodeTy *node)
 
static bool classof (const SVFValue *node)
 
- Static Public Member Functions inherited from SVF::GenericNode< NodeTy, EdgeTy >
static bool classof (const GenericNode< NodeTy, EdgeTy > *)
 
static bool classof (const SVFValue *)
 

Protected Member Functions

void updateExitBlock (SVFBasicBlock *bb)
 
void setLoopAndDomInfo (SVFLoopAndDomInfo *ld)
 
bool getIsNotRet () const
 
const std::vector< const ArgValVar * > & getArgs () const
 
- Protected Member Functions inherited from SVF::ObjVar
 ObjVar (NodeID i, const SVFType *svfType, PNODEK ty=ObjNode)
 Constructor.
 
- Protected Member Functions inherited from SVF::SVFVar
const SVFStmt::KindToSVFStmtMapTygetInEdgeKindToSetMap () const
 
const SVFStmt::KindToSVFStmtMapTygetOutEdgeKindToSetMap () const
 

Private Attributes

bool isDecl
 
bool intrinsic
 return true if this function does not have a body
 
bool isAddrTaken
 return true if this function is an intrinsic function (e.g., llvm.dbg), which does not reside in the application code
 
bool isUncalled
 return true if this function is address-taken (for indirect call purposes)
 
bool isNotRet
 return true if this function is never called
 
bool supVarArg
 return true if this function never returns
 
const SVFFunctionTypefuncType
 return true if this function supports variable arguments
 
SVFLoopAndDomInfoloopAndDom
 FunctionType, which is different from the type (PointerType) of this SVF Function.
 
const FunObjVarrealDefFun
 the loop and dominate information
 
BasicBlockGraphbbGraph
 the definition of a function across multiple modules
 
std::vector< const ArgValVar * > allArgs
 the basic block graph of this function
 
const SVFBasicBlockexitBlock
 all formal arguments of this function
 

Friends

class SVFIRBuilder
 
class LLVMModuleSet
 
class GraphDBClient
 

Additional Inherited Members

- Static Protected Member Functions inherited from SVF::SVFValue
static bool isICFGNodeKinds (GNodeK n)
 Helper functions to check node kinds.
 
static bool isInterICFGNodeKind (GNodeK n)
 
static bool isSVFVarKind (GNodeK n)
 
static bool isValVarKinds (GNodeK n)
 
static bool isConstantDataValVar (GNodeK n)
 
static bool isObjVarKinds (GNodeK n)
 
static bool isBaseObjVarKinds (GNodeK n)
 
static bool isConstantDataObjVarKinds (GNodeK n)
 
static bool isVFGNodeKinds (GNodeK n)
 
static bool isArgumentVFGNodeKinds (GNodeK n)
 
static bool isStmtVFGNodeKinds (GNodeK n)
 
static bool isPHIVFGNodeKinds (GNodeK n)
 
static bool isMRSVFGNodeKinds (GNodeK n)
 
static bool isMSSAPHISVFGNodeKinds (GNodeK n)
 
- Protected Attributes inherited from SVF::SVFVar
SVFStmt::KindToSVFStmtMapTy InEdgeKindToSetMap
 Maps tracking incoming and outgoing edges by kind.
 
SVFStmt::KindToSVFStmtMapTy OutEdgeKindToSetMap
 
- Protected Attributes inherited from SVF::SVFValue
NodeID id
 Node ID.
 
GNodeK nodeKind
 Node kind.
 
const SVFTypetype
 SVF type.
 
std::string name
 
std::string sourceLoc
 Source code information of this value.
 

Detailed Description

Definition at line 987 of file SVFVariables.h.

Member Typedef Documentation

◆ BBList

Definition at line 1015 of file SVFVariables.h.

◆ BBSet

Definition at line 1014 of file SVFVariables.h.

◆ const_bb_iterator

typedef BasicBlockGraph::IDToNodeMapTy::const_iterator SVF::FunObjVar::const_bb_iterator

Definition at line 1018 of file SVFVariables.h.

◆ LoopBBs

Definition at line 1016 of file SVFVariables.h.

Constructor & Destructor Documentation

◆ FunObjVar()

FunObjVar::FunObjVar ( NodeID  i,
ObjTypeInfo ti,
const ICFGNode node 
)

Constructor.

Definition at line 443 of file SVFVariables.cpp.

444 : BaseObjVar(i, ti, node, FunObjNode)
445{
446}
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

◆ ~FunObjVar()

virtual SVF::FunObjVar::~FunObjVar ( )
inlinevirtual

Definition at line 1069 of file SVFVariables.h.

1070 {
1071 delete loopAndDom;
1072 delete bbGraph;
1073 }
SVFLoopAndDomInfo * loopAndDom
FunctionType, which is different from the type (PointerType) of this SVF Function.
BasicBlockGraph * bbGraph
the definition of a function across multiple modules

Member Function Documentation

◆ addArgument()

void SVF::FunObjVar::addArgument ( const ArgValVar arg)
inline

Definition at line 1086 of file SVFVariables.h.

1087 {
1088 allArgs.push_back(arg);
1089 }
std::vector< const ArgValVar * > allArgs
the basic block graph of this function

◆ arg_size()

u32_t SVF::FunObjVar::arg_size ( ) const
inline

Definition at line 1240 of file SVFVariables.h.

1241 {
1242 return allArgs.size();
1243 }

◆ back()

const SVFBasicBlock * SVF::FunObjVar::back ( ) const
inline

Carefully! 'back' is just the last basic block of function, but not necessarily a exit basic block more refer to: https://github.com/SVF-tools/SVF/pull/1262

Definition at line 1255 of file SVFVariables.h.

1256 {
1257 assert(hasBasicBlock() && "function does not have any Basicblock, external function?");
1261 return std::prev(bbGraph->end())->second;
1262 }
bool hasBasicBlock() const

◆ begin()

const_bb_iterator SVF::FunObjVar::begin ( ) const
inline

Definition at line 1264 of file SVFVariables.h.

1265 {
1266 return bbGraph->begin();
1267 }
iterator begin()
Iterators.

◆ classof() [1/6]

static bool SVF::FunObjVar::classof ( const BaseObjVar node)
inlinestatic

Definition at line 1043 of file SVFVariables.h.

1044 {
1045 return node->getNodeKind() == FunObjNode;
1046 }

◆ classof() [2/6]

static bool SVF::FunObjVar::classof ( const FunObjVar )
inlinestatic

a 'single' basic block having no successors and containing return instruction in a function

Methods for support type inquiry through isa, cast, and dyn_cast:

Definition at line 1039 of file SVFVariables.h.

1040 {
1041 return true;
1042 }

◆ classof() [3/6]

static bool SVF::FunObjVar::classof ( const GenericPAGNodeTy node)
inlinestatic

Definition at line 1055 of file SVFVariables.h.

1056 {
1057 return node->getNodeKind() == FunObjNode;
1058 }

◆ classof() [4/6]

static bool SVF::FunObjVar::classof ( const ObjVar node)
inlinestatic

Definition at line 1047 of file SVFVariables.h.

1048 {
1049 return node->getNodeKind() == FunObjNode;
1050 }

◆ classof() [5/6]

static bool SVF::FunObjVar::classof ( const SVFValue node)
inlinestatic

Definition at line 1059 of file SVFVariables.h.

1060 {
1061 return node->getNodeKind() == FunObjNode;
1062 }

◆ classof() [6/6]

static bool SVF::FunObjVar::classof ( const SVFVar node)
inlinestatic

Definition at line 1051 of file SVFVariables.h.

1052 {
1053 return node->getNodeKind() == FunObjNode;
1054 }

◆ dominate()

bool SVF::FunObjVar::dominate ( const SVFBasicBlock bbKey,
const SVFBasicBlock bbValue 
) const
inline

Definition at line 1182 of file SVFVariables.h.

1183 {
1185 }
bool dominate(const SVFBasicBlock *bbKey, const SVFBasicBlock *bbValue) const
Definition SVFValue.cpp:102

◆ end()

const_bb_iterator SVF::FunObjVar::end ( ) const
inline

Definition at line 1269 of file SVFVariables.h.

1270 {
1271 return bbGraph->end();
1272 }

◆ front()

const SVFBasicBlock * SVF::FunObjVar::front ( ) const
inline

Definition at line 1250 of file SVFVariables.h.

1251 {
1252 return getEntryBlock();
1253 }
const SVFBasicBlock * getEntryBlock() const

◆ getArg()

const ArgValVar * SVF::FunObjVar::getArg ( u32_t  idx) const
inline

Definition at line 1245 of file SVFVariables.h.

1246 {
1247 assert (idx < allArgs.size() && "getArg() out of range!");
1248 return allArgs[idx];
1249 }

◆ getArgs()

const std::vector< const ArgValVar * > & SVF::FunObjVar::getArgs ( ) const
inlineprotected

Definition at line 1008 of file SVFVariables.h.

1009 {
1010 return allArgs;
1011 }

◆ getBasicBlockGraph() [1/2]

BasicBlockGraph * SVF::FunObjVar::getBasicBlockGraph ( )
inline

Definition at line 1204 of file SVFVariables.h.

1205 {
1206 return bbGraph;
1207 }

◆ getBasicBlockGraph() [2/2]

const BasicBlockGraph * SVF::FunObjVar::getBasicBlockGraph ( ) const
inline

Definition at line 1209 of file SVFVariables.h.

1210 {
1211 return bbGraph;
1212 }

◆ getDefFunForMultipleModule()

const FunObjVar * SVF::FunObjVar::getDefFunForMultipleModule ( ) const
inline

Definition at line 1192 of file SVFVariables.h.

1193 {
1194 if(realDefFun==nullptr)
1195 return this;
1196 return realDefFun;
1197 }
const FunObjVar * realDefFun
the loop and dominate information

◆ getDomFrontierMap()

const Map< const SVFBasicBlock *, BBSet > & SVF::FunObjVar::getDomFrontierMap ( ) const
inline

Definition at line 1172 of file SVFVariables.h.

1173 {
1174 return loopAndDom->getDomFrontierMap();
1175 }
const Map< const SVFBasicBlock *, BBSet > & getDomFrontierMap() const

◆ getDomTreeMap()

const Map< const SVFBasicBlock *, BBSet > & SVF::FunObjVar::getDomTreeMap ( ) const
inline

Definition at line 1167 of file SVFVariables.h.

1168 {
1169 return loopAndDom->getDomTreeMap();
1170 }
Map< const SVFBasicBlock *, BBSet > & getDomTreeMap()

◆ getEntryBlock()

const SVFBasicBlock * SVF::FunObjVar::getEntryBlock ( ) const
inline

Definition at line 1219 of file SVFVariables.h.

1220 {
1221 assert(hasBasicBlock() && "function does not have any Basicblock, external function?");
1222 assert(bbGraph->begin()->second->getInEdges().size() == 0 && "the first basic block is not entry block");
1223 return bbGraph->begin()->second;
1224 }

◆ getExitBB()

const SVFBasicBlock * SVF::FunObjVar::getExitBB ( ) const
inline

Definition at line 1226 of file SVFVariables.h.

1227 {
1228 assert(hasBasicBlock() && "function does not have any Basicblock, external function?");
1229 assert(exitBlock && "must have an exitBlock");
1230 return exitBlock;
1231 }
const SVFBasicBlock * exitBlock
all formal arguments of this function

◆ getExitBlocksOfLoop()

void SVF::FunObjVar::getExitBlocksOfLoop ( const SVFBasicBlock bb,
BBList exitbbs 
) const
inline

Definition at line 1142 of file SVFVariables.h.

1143 {
1145 }
void getExitBlocksOfLoop(const SVFBasicBlock *bb, BBList &exitbbs) const
Definition SVFValue.cpp:83

◆ getFunction()

const FunObjVar * FunObjVar::getFunction ( ) const
virtual

Get containing function, or null for globals/constants.

Reimplemented from SVF::BaseObjVar.

Definition at line 472 of file SVFVariables.cpp.

473{
474 return this;
475}

◆ getFunctionType()

const SVFFunctionType * SVF::FunObjVar::getFunctionType ( ) const
inline

Returns the FunctionType.

Definition at line 1121 of file SVFVariables.h.

1122 {
1123 return funcType;
1124 }
const SVFFunctionType * funcType
return true if this function supports variable arguments

◆ getIsNotRet()

bool SVF::FunObjVar::getIsNotRet ( ) const
inlineprotected

Definition at line 1004 of file SVFVariables.h.

1005 {
1006 return isNotRet;
1007 }
bool isNotRet
return true if this function is never called

◆ getLoopAndDomInfo()

SVFLoopAndDomInfo * SVF::FunObjVar::getLoopAndDomInfo ( ) const
inline

Definition at line 1132 of file SVFVariables.h.

1133 {
1134 return loopAndDom;
1135 }

◆ getLoopHeader()

const SVFBasicBlock * SVF::FunObjVar::getLoopHeader ( const BBList lp) const
inline

Definition at line 1157 of file SVFVariables.h.

1158 {
1159 return loopAndDom->getLoopHeader(lp);
1160 }
const SVFBasicBlock * getLoopHeader(const LoopBBs &lp) const

◆ getLoopInfo()

const LoopBBs & SVF::FunObjVar::getLoopInfo ( const SVFBasicBlock bb) const
inline

Definition at line 1152 of file SVFVariables.h.

1153 {
1154 return loopAndDom->getLoopInfo(bb);
1155 }
const LoopBBs & getLoopInfo(const SVFBasicBlock *bb) const
Definition SVFValue.cpp:76

◆ getReachableBBs()

const std::vector< const SVFBasicBlock * > & SVF::FunObjVar::getReachableBBs ( ) const
inline

Definition at line 1137 of file SVFVariables.h.

1138 {
1139 return loopAndDom->getReachableBBs();
1140 }
const BBList & getReachableBBs() const

◆ getReturnType()

const SVFType * SVF::FunObjVar::getReturnType ( ) const
inline

Returns the FunctionType.

Definition at line 1127 of file SVFVariables.h.

1128 {
1129 return funcType->getReturnType();
1130 }
const SVFType * getReturnType() const
Definition SVFType.h:403

◆ hasAddressTaken()

bool SVF::FunObjVar::hasAddressTaken ( ) const
inline

Definition at line 1100 of file SVFVariables.h.

1101 {
1102 return isAddrTaken;
1103 }
bool isAddrTaken
return true if this function is an intrinsic function (e.g., llvm.dbg), which does not reside in the ...

◆ hasBasicBlock()

bool SVF::FunObjVar::hasBasicBlock ( ) const
inline

Definition at line 1214 of file SVFVariables.h.

1215 {
1216 return bbGraph && bbGraph->begin() != bbGraph->end();
1217 }

◆ hasLoopInfo()

bool SVF::FunObjVar::hasLoopInfo ( const SVFBasicBlock bb) const
inline

Definition at line 1147 of file SVFVariables.h.

1148 {
1149 return loopAndDom->hasLoopInfo(bb);
1150 }
bool hasLoopInfo(const SVFBasicBlock *bb) const

◆ hasReturn()

bool SVF::FunObjVar::hasReturn ( ) const
inline

Definition at line 1115 of file SVFVariables.h.

1116 {
1117 return !isNotRet;
1118 }

◆ initFunObjVar()

void FunObjVar::initFunObjVar ( bool  decl,
bool  intrinc,
bool  addr,
bool  uncalled,
bool  notret,
bool  vararg,
const SVFFunctionType ft,
SVFLoopAndDomInfo ld,
const FunObjVar real,
BasicBlockGraph bbg,
const std::vector< const ArgValVar * > &  allarg,
const SVFBasicBlock exit 
)

Definition at line 448 of file SVFVariables.cpp.

451{
452 isDecl = decl;
458 funcType = ft;
459 loopAndDom = ld;
461 bbGraph = bbg;
462 allArgs = allarg;
463 exitBlock = exit;
464}
bool supVarArg
return true if this function never returns
bool intrinsic
return true if this function does not have a body
bool isUncalled
return true if this function is address-taken (for indirect call purposes)

◆ isDeclaration()

bool SVF::FunObjVar::isDeclaration ( ) const
inline

Definition at line 1090 of file SVFVariables.h.

1091 {
1092 return isDecl;
1093 }

◆ isIntrinsic()

bool SVF::FunObjVar::isIntrinsic ( ) const
inline

Definition at line 1095 of file SVFVariables.h.

1096 {
1097 return intrinsic;
1098 }

◆ isIsolatedNode()

bool FunObjVar::isIsolatedNode ( ) const
virtual

Check if this node is isolated (no edges) in the SVFIR graph.

Reimplemented from SVF::SVFVar.

Definition at line 467 of file SVFVariables.cpp.

468{
469 return isIntrinsic();
470}
bool isIntrinsic() const

◆ isLoopHeader()

bool SVF::FunObjVar::isLoopHeader ( const SVFBasicBlock bb) const
inline

Definition at line 1177 of file SVFVariables.h.

1178 {
1179 return loopAndDom->isLoopHeader(bb);
1180 }
bool isLoopHeader(const SVFBasicBlock *bb) const
Definition SVFValue.cpp:189

◆ isUncalledFunction()

bool SVF::FunObjVar::isUncalledFunction ( ) const
inline

Definition at line 1110 of file SVFVariables.h.

1111 {
1112 return isUncalled;
1113 }

◆ isVarArg()

bool SVF::FunObjVar::isVarArg ( ) const
inline

Definition at line 1105 of file SVFVariables.h.

1106 {
1107 return supVarArg;
1108 }

◆ loopContainsBB()

bool SVF::FunObjVar::loopContainsBB ( const BBList lp,
const SVFBasicBlock bb 
) const
inline

Definition at line 1162 of file SVFVariables.h.

1163 {
1164 return loopAndDom->loopContainsBB(lp,bb);
1165 }
bool loopContainsBB(const LoopBBs &lp, const SVFBasicBlock *bb) const

◆ postDominate()

bool SVF::FunObjVar::postDominate ( const SVFBasicBlock bbKey,
const SVFBasicBlock bbValue 
) const
inline

Definition at line 1187 of file SVFVariables.h.

1188 {
1190 }
bool postDominate(const SVFBasicBlock *bbKey, const SVFBasicBlock *bbValue) const
Definition SVFValue.cpp:133

◆ setBasicBlockGraph()

void SVF::FunObjVar::setBasicBlockGraph ( BasicBlockGraph graph)
inline

Definition at line 1199 of file SVFVariables.h.

1200 {
1201 this->bbGraph = graph;
1202 }

◆ setExitBlock()

void SVF::FunObjVar::setExitBlock ( SVFBasicBlock bb)
inline

Definition at line 1233 of file SVFVariables.h.

1234 {
1235 assert(!exitBlock && "have already set exit Basicblock!");
1236 exitBlock = bb;
1237 }

◆ setLoopAndDomInfo()

void SVF::FunObjVar::setLoopAndDomInfo ( SVFLoopAndDomInfo ld)
inlineprotected

Definition at line 1000 of file SVFVariables.h.

1001 {
1002 loopAndDom = ld;
1003 }

◆ setRelDefFun()

void SVF::FunObjVar::setRelDefFun ( const FunObjVar real)
inline

Definition at line 1079 of file SVFVariables.h.

1080 {
1081 realDefFun = real;
1082 }

◆ toString()

const std::string FunObjVar::toString ( ) const
virtual

Get string representation.

Reimplemented from SVF::BaseObjVar.

Definition at line 477 of file SVFVariables.cpp.

478{
479 std::string str;
480 std::stringstream rawstr(str);
481 rawstr << "FunObjVar ID: " << getId() << " (base object)";
483 {
484 rawstr << "\n";
485 rawstr << getName();
486 }
487 return rawstr.str();
488}
NodeID getId() const
Get the memory object id.
static const Option< bool > ShowSVFIRValue
Definition Options.h:119
virtual const std::string & getName() const
Definition SVFValue.h:186

◆ updateExitBlock()

void SVF::FunObjVar::updateExitBlock ( SVFBasicBlock bb)
inlineprotected

Definition at line 995 of file SVFVariables.h.

996 {
997 exitBlock = bb;
998 }

Friends And Related Symbol Documentation

◆ GraphDBClient

friend class GraphDBClient
friend

Definition at line 991 of file SVFVariables.h.

◆ LLVMModuleSet

Definition at line 990 of file SVFVariables.h.

◆ SVFIRBuilder

Definition at line 989 of file SVFVariables.h.

Member Data Documentation

◆ allArgs

std::vector<const ArgValVar*> SVF::FunObjVar::allArgs
private

the basic block graph of this function

Definition at line 1032 of file SVFVariables.h.

◆ bbGraph

BasicBlockGraph* SVF::FunObjVar::bbGraph
private

the definition of a function across multiple modules

Definition at line 1031 of file SVFVariables.h.

◆ exitBlock

const SVFBasicBlock* SVF::FunObjVar::exitBlock
private

all formal arguments of this function

Definition at line 1033 of file SVFVariables.h.

◆ funcType

const SVFFunctionType* SVF::FunObjVar::funcType
private

return true if this function supports variable arguments

Definition at line 1028 of file SVFVariables.h.

◆ intrinsic

bool SVF::FunObjVar::intrinsic
private

return true if this function does not have a body

Definition at line 1023 of file SVFVariables.h.

◆ isAddrTaken

bool SVF::FunObjVar::isAddrTaken
private

return true if this function is an intrinsic function (e.g., llvm.dbg), which does not reside in the application code

Definition at line 1024 of file SVFVariables.h.

◆ isDecl

bool SVF::FunObjVar::isDecl
private

Definition at line 1022 of file SVFVariables.h.

◆ isNotRet

bool SVF::FunObjVar::isNotRet
private

return true if this function is never called

Definition at line 1026 of file SVFVariables.h.

◆ isUncalled

bool SVF::FunObjVar::isUncalled
private

return true if this function is address-taken (for indirect call purposes)

Definition at line 1025 of file SVFVariables.h.

◆ loopAndDom

SVFLoopAndDomInfo* SVF::FunObjVar::loopAndDom
private

FunctionType, which is different from the type (PointerType) of this SVF Function.

Definition at line 1029 of file SVFVariables.h.

◆ realDefFun

const FunObjVar* SVF::FunObjVar::realDefFun
private

the loop and dominate information

Definition at line 1030 of file SVFVariables.h.

◆ supVarArg

bool SVF::FunObjVar::supVarArg
private

return true if this function never returns

Definition at line 1027 of file SVFVariables.h.


The documentation for this class was generated from the following files: