Static Value-Flow Analysis
Namespaces | Functions
LLVMUtil.h File Reference
#include "Util/SVFUtil.h"
#include "SVF-LLVM/BasicTypes.h"
#include "SVFIR/SVFValue.h"
#include "Util/ThreadAPI.h"

Go to the source code of this file.

Namespaces

 SVF
 for isBitcode
 
 SVF::LLVMUtil
 

Functions

bool SVF::LLVMUtil::isCallSite (const Instruction *inst)
 Whether an instruction is a call or invoke instruction. More...
 
bool SVF::LLVMUtil::isCallSite (const Value *val)
 Whether an instruction is a call or invoke instruction. More...
 
const CallBase * SVF::LLVMUtil::getLLVMCallSite (const Value *value)
 Return LLVM callsite given a value. More...
 
const Function * SVF::LLVMUtil::getCallee (const CallBase *cs)
 
const Function * SVF::LLVMUtil::getLLVMFunction (const Value *val)
 Return LLVM function if this value is. More...
 
const FunctionSVF::LLVMUtil::getProgFunction (const std::string &funName)
 Get program entry function from module. More...
 
bool SVF::LLVMUtil::isProgEntryFunction (const Function *fun)
 Check whether a function is an entry function (i.e., main) More...
 
bool SVF::LLVMUtil::isBlackholeSym (const Value *val)
 Check whether this value is a black hole. More...
 
bool SVF::LLVMUtil::isNullPtrSym (const Value *val)
 Check whether this value is a black hole. More...
 
static Type * SVF::LLVMUtil::getPtrElementType (const PointerType *pty)
 
u32_t SVF::LLVMUtil::getNumOfElements (const Type *ety)
 Return size of this object based on LLVM value. More...
 
bool SVF::LLVMUtil::isObject (const Value *ref)
 Return true if this value refers to a object. More...
 
bool SVF::LLVMUtil::isUncalledFunction (const Function *fun)
 whether this is a function without any possible caller? More...
 
bool SVF::LLVMUtil::ArgInDeadFunction (const Value *val)
 whether this is an argument in dead function More...
 
bool SVF::LLVMUtil::ArgInProgEntryFunction (const Value *val)
 Return true if this is an argument of a program entry function (e.g. main) More...
 
bool SVF::LLVMUtil::isPtrInUncalledFunction (const Value *value)
 Return true if this is value in a dead function (function without any caller) More...
 
bool SVF::LLVMUtil::isNoCallerFunction (const Function *fun)
 Function does not have any possible caller in the call graph. More...
 
bool SVF::LLVMUtil::isArgOfUncalledFunction (const Value *val)
 Return true if the argument in a function does not have a caller. More...
 
bool SVF::LLVMUtil::basicBlockHasRetInst (const BasicBlock *bb)
 Return true if the function has a return instruction. More...
 
bool SVF::LLVMUtil::functionDoesNotRet (const Function *fun)
 
void SVF::LLVMUtil::getFunReachableBBs (const Function *svfFun, std::vector< const SVFBasicBlock * > &bbs)
 Get reachable basic block from function entry. More...
 
const ValueSVF::LLVMUtil::stripConstantCasts (const Value *val)
 Strip off the constant casts. More...
 
const ValueSVF::LLVMUtil::stripAllCasts (const Value *val)
 Strip off the all casts. More...
 
const ValueSVF::LLVMUtil::getFirstUseViaCastInst (const Value *val)
 
const ConstantExpr * SVF::LLVMUtil::isGepConstantExpr (const Value *val)
 Return corresponding constant expression, otherwise return nullptr. More...
 
const ConstantExpr * SVF::LLVMUtil::isInt2PtrConstantExpr (const Value *val)
 
const ConstantExpr * SVF::LLVMUtil::isPtr2IntConstantExpr (const Value *val)
 
const ConstantExpr * SVF::LLVMUtil::isCastConstantExpr (const Value *val)
 
const ConstantExpr * SVF::LLVMUtil::isSelectConstantExpr (const Value *val)
 
const ConstantExpr * SVF::LLVMUtil::isTruncConstantExpr (const Value *val)
 
const ConstantExpr * SVF::LLVMUtil::isCmpConstantExpr (const Value *val)
 
const ConstantExpr * SVF::LLVMUtil::isBinaryConstantExpr (const Value *val)
 
const ConstantExpr * SVF::LLVMUtil::isUnaryConstantExpr (const Value *val)
 
static DataLayout * SVF::LLVMUtil::getDataLayout (Module *mod)
 
void SVF::LLVMUtil::getNextInsts (const Instruction *curInst, std::vector< const Instruction * > &instList)
 Get the next instructions following control flow. More...
 
bool SVF::LLVMUtil::isNoPrecessorBasicBlock (const BasicBlock *bb)
 
bool SVF::LLVMUtil::isIRFile (const std::string &filename)
 Check whether a file is an LLVM IR file. More...
 
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. More...
 
const std::string SVF::LLVMUtil::getSourceLoc (const Value *val)
 
const std::string SVF::LLVMUtil::getSourceLocOfFunction (const Function *F)
 
bool SVF::LLVMUtil::isIntrinsicInst (const Instruction *inst)
 Return true if it is an intrinsic instruction. More...
 
bool SVF::LLVMUtil::isIntrinsicFun (const Function *func)
 
std::vector< const Function * > SVF::LLVMUtil::getCalledFunctions (const Function *F)
 Get all called funcions in a parent function. More...
 
std::string SVF::LLVMUtil::restoreFuncName (std::string funcName)
 
const SVFFunctionSVF::LLVMUtil::getFunction (const std::string &name)
 Get the corresponding Function based on its name. More...
 
bool SVF::LLVMUtil::isConstDataOrAggData (const Value *val)
 Return true if the value refers to constant data, e.g., i32 0. More...
 
const ValueSVF::LLVMUtil::getGlobalRep (const Value *val)
 find the unique defined global across multiple modules More...
 
bool SVF::LLVMUtil::isConstantObjSym (const SVFValue *val)
 Check whether this value points-to a constant object. More...
 
bool SVF::LLVMUtil::isConstantObjSym (const Value *val)
 Check whether this value points-to a constant object. More...
 
void SVF::LLVMUtil::viewCFG (const Function *fun)
 
void SVF::LLVMUtil::viewCFGOnly (const Function *fun)
 
std::string SVF::LLVMUtil::dumpValue (const Value *val)
 
std::string SVF::LLVMUtil::dumpType (const Type *type)
 
std::string SVF::LLVMUtil::dumpValueAndDbgInfo (const Value *val)
 
bool SVF::LLVMUtil::isHeapAllocExtCallViaRet (const Instruction *inst)
 
bool SVF::LLVMUtil::isHeapAllocExtCallViaArg (const Instruction *inst)
 
bool SVF::LLVMUtil::isHeapAllocExtCall (const Instruction *inst)
 
bool SVF::LLVMUtil::isNonInstricCallSite (const Instruction *inst)
 Whether an instruction is a callsite in the application code, excluding llvm intrinsic calls. More...
 
const Function * SVF::LLVMUtil::getProgEntryFunction (Module &module)
 Get program entry function from module. More...