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. | |
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. | |
static Type * | getPtrElementType (const PointerType *pty) |
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) |
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) |
const SVFFunction * | getFunction (const std::string &name) |
Get the corresponding Function based on its 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 SVFValue *val) |
Check whether this value points-to a constant object. | |
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. | |
whether this is an argument in dead function
Definition at line 122 of file LLVMUtil.h.
Return true if this is an argument of a program entry function (e.g. main)
Definition at line 130 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 108 of file LLVMUtil.cpp.
Definition at line 606 of file LLVMUtil.cpp.
Return true if the function has a return instruction reachable from function entry
Definition at line 122 of file LLVMUtil.cpp.
Get all called funcions in a parent function.
Definition at line 364 of file LLVMUtil.cpp.
Definition at line 63 of file LLVMUtil.h.
|
inlinestatic |
Definition at line 279 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 278 of file LLVMUtil.cpp.
const SVFFunction * SVF::LLVMUtil::getFunction | ( | const std::string & | name | ) |
Get the corresponding Function based on its name.
Definition at line 411 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 74 of file LLVMUtil.cpp.
find the unique defined global across multiple modules
Definition at line 416 of file LLVMUtil.cpp.
Return LLVM callsite given a value.
Definition at line 57 of file LLVMUtil.h.
Return LLVM function if this value is.
Definition at line 70 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 550 of file LLVMUtil.cpp.
Return size of this object based on LLVM value.
Return size of this Object
Definition at line 296 of file LLVMUtil.cpp.
Get program entry function from module.
Definition at line 380 of file LLVMUtil.h.
Get program entry function from module.
Definition at line 39 of file LLVMUtil.cpp.
|
inlinestatic |
Definition at line 96 of file LLVMUtil.h.
Get the meta data (line number and file name) info of a LLVM value
Definition at line 429 of file LLVMUtil.cpp.
Get source code line number of a function according to debug info
Definition at line 533 of file LLVMUtil.cpp.
Return true if the argument in a function does not have a caller.
Definition at line 151 of file LLVMUtil.h.
|
inline |
Definition at line 256 of file LLVMUtil.h.
Check whether this value is a black hole.
Definition at line 85 of file LLVMUtil.h.
|
inline |
Whether an instruction is a call or invoke instruction.
Definition at line 45 of file LLVMUtil.h.
Whether an instruction is a call or invoke instruction.
Definition at line 50 of file LLVMUtil.h.
|
inline |
Definition at line 211 of file LLVMUtil.h.
|
inline |
Definition at line 245 of file LLVMUtil.h.
Check whether this value points-to a constant object.
Definition at line 578 of file LLVMUtil.cpp.
Check whether this value points-to a constant object.
Check whether this value points-to a constant object
Definition at line 672 of file CppUtil.cpp.
Return true if the value refers to constant data, e.g., i32 0.
Definition at line 327 of file LLVMUtil.h.
|
inline |
Return corresponding constant expression, otherwise return nullptr.
Definition at line 181 of file LLVMUtil.h.
|
inline |
Definition at line 358 of file LLVMUtil.h.
bool SVF::LLVMUtil::isHeapAllocExtCallViaArg | ( | const Instruction * | inst | ) |
Definition at line 633 of file LLVMUtil.cpp.
bool SVF::LLVMUtil::isHeapAllocExtCallViaRet | ( | const Instruction * | inst | ) |
Definition at line 617 of file LLVMUtil.cpp.
Check if a given value represents a heap object.
val | The value to check. |
Definition at line 669 of file LLVMUtil.cpp.
|
inline |
Definition at line 191 of file LLVMUtil.h.
Definition at line 190 of file LLVMUtil.cpp.
bool SVF::LLVMUtil::isIntrinsicInst | ( | const Instruction * | inst | ) |
Return true if it is an intrinsic instruction.
Definition at line 203 of file LLVMUtil.cpp.
Check whether a file is an LLVM IR file.
Definition at line 315 of file LLVMUtil.cpp.
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 145 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 707 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 297 of file LLVMUtil.h.
Check whether this value is a black hole.
Definition at line 91 of file LLVMUtil.h.
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 59 of file LLVMUtil.cpp.
Check whether a function is an entry function (i.e., main)
Definition at line 79 of file LLVMUtil.h.
|
inline |
Definition at line 201 of file LLVMUtil.h.
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 175 of file LLVMUtil.cpp.
|
inline |
Definition at line 221 of file LLVMUtil.h.
|
inline |
Definition at line 365 of file LLVMUtil.h.
bool SVF::LLVMUtil::isStackAllocExtCallViaRet | ( | const Instruction * | inst | ) |
Definition at line 648 of file LLVMUtil.cpp.
val | The value to check. |
Definition at line 691 of file LLVMUtil.cpp.
|
inline |
|
inline |
Definition at line 267 of file LLVMUtil.h.
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 158 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 336 of file LLVMUtil.cpp.
std::string SVF::LLVMUtil::restoreFuncName | ( | std::string | funcName | ) |
Definition at line 383 of file LLVMUtil.cpp.
Strip off the all casts.
Strip all casts
Definition at line 250 of file LLVMUtil.cpp.
Strip off the constant casts.
Strip constant casts
Definition at line 219 of file LLVMUtil.cpp.
Definition at line 231 of file LLVMUtil.cpp.
Definition at line 239 of file LLVMUtil.cpp.