|
Static Value-Flow Analysis
|
Functions | |
| bool | isCallSite (const Instruction *inst) |
| Whether an instruction is a call or invoke instruction. | |
| bool | isCallSite (const Value *val) |
| Whether an instruction is a call or invoke instruction. | |
| double | getDoubleValue (const ConstantFP *fpValue) |
| std::pair< s64_t, u64_t > | getIntegerValue (const ConstantInt *intValue) |
| const CallBase * | getLLVMCallSite (const Value *value) |
| Return LLVM callsite given a value. | |
| const Function * | getCallee (const CallBase *cs) |
| const Function * | getLLVMFunction (const Value *val) |
| Return LLVM function if this value is. | |
| const Function * | getProgFunction (const std::string &funName) |
| Get program entry function from module. | |
| bool | isProgEntryFunction (const Function *fun) |
| Check whether a function is an entry function (i.e., main). | |
| bool | isBlackholeSym (const Value *val) |
| Check whether this value is a black hole. | |
| bool | isNullPtrSym (const Value *val) |
| Check whether this value is a black hole. | |
| u32_t | getNumOfElements (const Type *ety) |
| Return size of this object based on LLVM value. | |
| bool | isObject (const Value *ref) |
| Return true if this value refers to a object. | |
| bool | isUncalledFunction (const Function *fun) |
| whether this is a function without any possible caller? | |
| bool | ArgInDeadFunction (const Value *val) |
| whether this is an argument in dead function | |
| bool | ArgInProgEntryFunction (const Value *val) |
| Return true if this is an argument of a program entry function (e.g. main). | |
| bool | isPtrInUncalledFunction (const Value *value) |
| Return true if this is value in a dead function (function without any caller). | |
| bool | isNoCallerFunction (const Function *fun) |
| Function does not have any possible caller in the call graph. | |
| bool | isArgOfUncalledFunction (const Value *val) |
| Return true if the argument in a function does not have a caller. | |
| bool | basicBlockHasRetInst (const BasicBlock *bb) |
| Return true if the function has a return instruction. | |
| bool | functionDoesNotRet (const Function *fun) |
| void | getFunReachableBBs (const Function *svfFun, std::vector< const SVFBasicBlock * > &bbs) |
| Get reachable basic block from function entry. | |
| const Value * | stripConstantCasts (const Value *val) |
| Strip off the constant casts. | |
| const Value * | stripAllCasts (const Value *val) |
| Strip off the all casts. | |
| const Value * | getFirstUseViaCastInst (const Value *val) |
| const ConstantExpr * | isGepConstantExpr (const Value *val) |
| Return corresponding constant expression, otherwise return nullptr. | |
| const ConstantExpr * | isInt2PtrConstantExpr (const Value *val) |
| const ConstantExpr * | isPtr2IntConstantExpr (const Value *val) |
| const ConstantExpr * | isCastConstantExpr (const Value *val) |
| const ConstantExpr * | isSelectConstantExpr (const Value *val) |
| const ConstantExpr * | isTruncConstantExpr (const Value *val) |
| const ConstantExpr * | isCmpConstantExpr (const Value *val) |
| const ConstantExpr * | isBinaryConstantExpr (const Value *val) |
| const ConstantExpr * | isUnaryConstantExpr (const Value *val) |
| static DataLayout * | getDataLayout (Module *mod) |
| static llvm::Triple | getTargetTriple (const Module *mod) |
| static TargetABI | detectTargetABI (const llvm::Triple &triple) |
| void | getNextInsts (const Instruction *curInst, std::vector< const Instruction * > &instList) |
| Get the next instructions following control flow. | |
| bool | isNoPrecessorBasicBlock (const BasicBlock *bb) |
| bool | isIRFile (const std::string &filename) |
| Check whether a file is an LLVM IR file. | |
| void | processArguments (int argc, char **argv, int &arg_num, char **arg_value, std::vector< std::string > &moduleNameVec) |
| Parse argument for multi-module analysis. | |
| const std::string | getSourceLoc (const Value *val) |
| const std::string | getSourceLocOfFunction (const Function *F) |
| bool | isIntrinsicInst (const Instruction *inst) |
| Return true if it is an intrinsic instruction. | |
| bool | isIntrinsicFun (const Function *func) |
| std::vector< const Function * > | getCalledFunctions (const Function *F) |
| Get all called funcions in a parent function. | |
| std::string | restoreFuncName (std::string funcName) |
| bool | isExtCall (const Function *fun) |
| bool | isMemcpyExtFun (const Function *fun) |
| bool | isMemsetExtFun (const Function *fun) |
| u32_t | getHeapAllocHoldingArgPosition (const Function *fun) |
| const FunObjVar * | getFunObjVar (const std::string &name) |
| bool | isConstDataOrAggData (const Value *val) |
| Return true if the value refers to constant data, e.g., i32 0. | |
| const Value * | getGlobalRep (const Value *val) |
| find the unique defined global across multiple modules | |
| bool | isConstantObjSym (const Value *val) |
| Check whether this value points-to a constant object. | |
| void | viewCFG (const Function *fun) |
| void | viewCFGOnly (const Function *fun) |
| std::string | dumpValue (const Value *val) |
| std::string | dumpType (const Type *type) |
| std::string | dumpValueAndDbgInfo (const Value *val) |
| bool | isHeapAllocExtCallViaRet (const Instruction *inst) |
| bool | isHeapAllocExtCallViaArg (const Instruction *inst) |
| bool | isHeapAllocExtCall (const Instruction *inst) |
| bool | isStackAllocExtCallViaRet (const Instruction *inst) |
| bool | isStackAllocExtCall (const Instruction *inst) |
| bool | isHeapObj (const Value *val) |
| bool | isStackObj (const Value *val) |
| bool | isNonInstricCallSite (const Instruction *inst) |
| Whether an instruction is a callsite in the application code, excluding llvm intrinsic calls. | |
| const Function * | getProgEntryFunction (Module &module) |
| Get program entry function from module. | |
|
inline |
whether this is an argument in dead function
Definition at line 158 of file LLVMUtil.h.
|
inline |
Return true if this is an argument of a program entry function (e.g. main).
Definition at line 166 of file LLVMUtil.h.
| bool SVF::LLVMUtil::basicBlockHasRetInst | ( | const BasicBlock * | bb | ) |
Return true if the function has a return instruction.
Return true if the basic block has a return instruction
Definition at line 110 of file LLVMUtil.cpp.
|
inlinestatic |
Definition at line 337 of file LLVMUtil.h.
| std::string SVF::LLVMUtil::dumpType | ( | const Type * | type | ) |
Definition at line 623 of file LLVMUtil.cpp.
| std::string SVF::LLVMUtil::dumpValue | ( | const Value * | val | ) |
Definition at line 612 of file LLVMUtil.cpp.
| std::string SVF::LLVMUtil::dumpValueAndDbgInfo | ( | const Value * | val | ) |
Definition at line 634 of file LLVMUtil.cpp.
| bool SVF::LLVMUtil::functionDoesNotRet | ( | const Function * | fun | ) |
Return true if the function has a return instruction reachable from function entry
Definition at line 124 of file LLVMUtil.cpp.
Get all called funcions in a parent function.
Definition at line 365 of file LLVMUtil.cpp.
Definition at line 110 of file LLVMUtil.h.
|
inlinestatic |
Definition at line 315 of file LLVMUtil.h.
|
inline |
Definition at line 67 of file LLVMUtil.h.
Return the bitcast instruction right next to val, otherwise return nullptr
If type is void* (i8*) and val is immediately used at a bitcast instruction
Definition at line 279 of file LLVMUtil.cpp.
| const FunObjVar * SVF::LLVMUtil::getFunObjVar | ( | const std::string & | name | ) |
Definition at line 437 of file LLVMUtil.cpp.
| void SVF::LLVMUtil::getFunReachableBBs | ( | const Function * | fun, |
| std::vector< const SVFBasicBlock * > & | reachableBBs ) |
Get reachable basic block from function entry.
Return reachable bbs from function entry
Definition at line 76 of file LLVMUtil.cpp.
find the unique defined global across multiple modules
Definition at line 441 of file LLVMUtil.cpp.
Definition at line 402 of file LLVMUtil.cpp.
|
inline |
Definition at line 95 of file LLVMUtil.h.
Return LLVM callsite given a value.
Definition at line 104 of file LLVMUtil.h.
Return LLVM function if this value is.
Definition at line 117 of file LLVMUtil.h.
| void SVF::LLVMUtil::getNextInsts | ( | const Instruction * | curInst, |
| std::vector< const Instruction * > & | instList ) |
Get the next instructions following control flow.
Definition at line 585 of file LLVMUtil.cpp.
Return size of this object based on LLVM value.
Return size of this Object
Definition at line 297 of file LLVMUtil.cpp.
Get program entry function from module.
Definition at line 447 of file LLVMUtil.h.
| const Function * SVF::LLVMUtil::getProgFunction | ( | const std::string & | funName | ) |
Get program entry function from module.
Definition at line 41 of file LLVMUtil.cpp.
| const std::string SVF::LLVMUtil::getSourceLoc | ( | const Value * | val | ) |
Get the meta data (line number and file name) info of a LLVM value
Definition at line 454 of file LLVMUtil.cpp.
| const std::string SVF::LLVMUtil::getSourceLocOfFunction | ( | const Function * | F | ) |
Get source code line number of a function according to debug info
Definition at line 568 of file LLVMUtil.cpp.
|
inlinestatic |
Definition at line 327 of file LLVMUtil.h.
|
inline |
Return true if the argument in a function does not have a caller.
Definition at line 187 of file LLVMUtil.h.
|
inline |
Definition at line 292 of file LLVMUtil.h.
|
inline |
Check whether this value is a black hole.
Definition at line 133 of file LLVMUtil.h.
|
inline |
Whether an instruction is a call or invoke instruction.
Definition at line 57 of file LLVMUtil.h.
|
inline |
Whether an instruction is a call or invoke instruction.
Definition at line 62 of file LLVMUtil.h.
|
inline |
Definition at line 247 of file LLVMUtil.h.
|
inline |
Definition at line 281 of file LLVMUtil.h.
| bool SVF::LLVMUtil::isConstantObjSym | ( | const Value * | val | ) |
Check whether this value points-to a constant object.
Check whether this value points-to a constant object
Definition at line 705 of file CppUtil.cpp.
|
inline |
Return true if the value refers to constant data, e.g., i32 0.
Definition at line 397 of file LLVMUtil.h.
| bool SVF::LLVMUtil::isExtCall | ( | const Function * | fun | ) |
Definition at line 385 of file LLVMUtil.cpp.
|
inline |
Return corresponding constant expression, otherwise return nullptr.
Definition at line 217 of file LLVMUtil.h.
|
inline |
Definition at line 425 of file LLVMUtil.h.
| bool SVF::LLVMUtil::isHeapAllocExtCallViaArg | ( | const Instruction * | inst | ) |
Definition at line 660 of file LLVMUtil.cpp.
| bool SVF::LLVMUtil::isHeapAllocExtCallViaRet | ( | const Instruction * | inst | ) |
Definition at line 645 of file LLVMUtil.cpp.
| bool SVF::LLVMUtil::isHeapObj | ( | const Value * | val | ) |
Check if a given value represents a heap object.
| val | The value to check. |
Definition at line 694 of file LLVMUtil.cpp.
|
inline |
Definition at line 227 of file LLVMUtil.h.
| bool SVF::LLVMUtil::isIntrinsicFun | ( | const Function * | func | ) |
Definition at line 191 of file LLVMUtil.cpp.
| bool SVF::LLVMUtil::isIntrinsicInst | ( | const Instruction * | inst | ) |
Return true if it is an intrinsic instruction.
Definition at line 204 of file LLVMUtil.cpp.
| bool SVF::LLVMUtil::isIRFile | ( | const std::string & | filename | ) |
Check whether a file is an LLVM IR file.
Definition at line 316 of file LLVMUtil.cpp.
| bool SVF::LLVMUtil::isMemcpyExtFun | ( | const Function * | fun | ) |
Definition at line 390 of file LLVMUtil.cpp.
| bool SVF::LLVMUtil::isMemsetExtFun | ( | const Function * | fun | ) |
Definition at line 396 of file LLVMUtil.cpp.
|
inline |
Function does not have any possible caller in the call graph.
Return true if the function does not have a caller (either it is a main function or a dead function)
Definition at line 181 of file LLVMUtil.h.
| bool SVF::LLVMUtil::isNonInstricCallSite | ( | const Instruction * | inst | ) |
Whether an instruction is a callsite in the application code, excluding llvm intrinsic calls.
Definition at line 732 of file LLVMUtil.cpp.
|
inline |
Basic block does not have predecessors map-1.cpp.bc try.cont: ; No predecessors! call void @llvm.trap() unreachable
Definition at line 360 of file LLVMUtil.h.
|
inline |
Check whether this value is a black hole.
Definition at line 139 of file LLVMUtil.h.
| bool SVF::LLVMUtil::isObject | ( | const Value * | ref | ) |
Return true if this value refers to a object.
A value represents an object if it is 1) function, 2) global 3) stack 4) heap
Definition at line 61 of file LLVMUtil.cpp.
|
inline |
Check whether a function is an entry function (i.e., main).
Definition at line 126 of file LLVMUtil.h.
|
inline |
Definition at line 237 of file LLVMUtil.h.
| bool SVF::LLVMUtil::isPtrInUncalledFunction | ( | const Value * | value | ) |
Return true if this is value in a dead function (function without any caller).
Return true if this is a value in a dead function (function without any caller)
Definition at line 176 of file LLVMUtil.cpp.
|
inline |
Definition at line 257 of file LLVMUtil.h.
|
inline |
Definition at line 432 of file LLVMUtil.h.
| bool SVF::LLVMUtil::isStackAllocExtCallViaRet | ( | const Instruction * | inst | ) |
Definition at line 674 of file LLVMUtil.cpp.
| bool SVF::LLVMUtil::isStackObj | ( | const Value * | val | ) |
| val | The value to check. |
Definition at line 716 of file LLVMUtil.cpp.
|
inline |
Definition at line 267 of file LLVMUtil.h.
|
inline |
Definition at line 303 of file LLVMUtil.h.
| bool SVF::LLVMUtil::isUncalledFunction | ( | const Function * | fun | ) |
whether this is a function without any possible caller?
Method for dead function, which does not have any possible caller function address is not taken and never be used in call or invoke instruction
Return true if this is a function without any possible caller
Definition at line 159 of file LLVMUtil.cpp.
| void SVF::LLVMUtil::processArguments | ( | int | argc, |
| char ** | argv, | ||
| int & | arg_num, | ||
| char ** | arg_value, | ||
| std::vector< std::string > & | moduleNameVec ) |
Parse argument for multi-module analysis.
Get the names of all modules into a vector And process arguments
Definition at line 337 of file LLVMUtil.cpp.
| std::string SVF::LLVMUtil::restoreFuncName | ( | std::string | funcName | ) |
Definition at line 408 of file LLVMUtil.cpp.
Strip off the all casts.
Strip all casts
Definition at line 251 of file LLVMUtil.cpp.
Strip off the constant casts.
Strip constant casts
Definition at line 220 of file LLVMUtil.cpp.
| void SVF::LLVMUtil::viewCFG | ( | const Function * | fun | ) |
Definition at line 232 of file LLVMUtil.cpp.
| void SVF::LLVMUtil::viewCFGOnly | ( | const Function * | fun | ) |
Definition at line 240 of file LLVMUtil.cpp.