Static Value-Flow Analysis
Loading...
Searching...
No Matches
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

namespace  SVF
 for isBitcode
 
namespace  SVF::LLVMUtil
 

Functions

bool SVF::LLVMUtil::isCallSite (const Instruction *inst)
 Whether an instruction is a call or invoke instruction.
 
bool SVF::LLVMUtil::isCallSite (const Value *val)
 Whether an instruction is a call or invoke instruction.
 
double SVF::LLVMUtil::getDoubleValue (const ConstantFP *fpValue)
 
std::pair< s64_t, u64_tSVF::LLVMUtil::getIntegerValue (const ConstantInt *intValue)
 
const CallBaseSVF::LLVMUtil::getLLVMCallSite (const Value *value)
 Return LLVM callsite given a value.
 
const FunctionSVF::LLVMUtil::getCallee (const CallBase *cs)
 
const FunctionSVF::LLVMUtil::getLLVMFunction (const Value *val)
 Return LLVM function if this value is.
 
const FunctionSVF::LLVMUtil::getProgFunction (const std::string &funName)
 Get program entry function from module.
 
bool SVF::LLVMUtil::isProgEntryFunction (const Function *fun)
 Check whether a function is an entry function (i.e., main)
 
bool SVF::LLVMUtil::isBlackholeSym (const Value *val)
 Check whether this value is a black hole.
 
bool SVF::LLVMUtil::isNullPtrSym (const Value *val)
 Check whether this value is a black hole.
 
static TypeSVF::LLVMUtil::getPtrElementType (const PointerType *pty)
 
u32_t SVF::LLVMUtil::getNumOfElements (const Type *ety)
 Return size of this object based on LLVM value.
 
bool SVF::LLVMUtil::isObject (const Value *ref)
 Return true if this value refers to a object.
 
bool SVF::LLVMUtil::isUncalledFunction (const Function *fun)
 whether this is a function without any possible caller?
 
bool SVF::LLVMUtil::ArgInDeadFunction (const Value *val)
 whether this is an argument in dead function
 
bool SVF::LLVMUtil::ArgInProgEntryFunction (const Value *val)
 Return true if this is an argument of a program entry function (e.g. main)
 
bool SVF::LLVMUtil::isPtrInUncalledFunction (const Value *value)
 Return true if this is value in a dead function (function without any caller)
 
bool SVF::LLVMUtil::isNoCallerFunction (const Function *fun)
 Function does not have any possible caller in the call graph.
 
bool SVF::LLVMUtil::isArgOfUncalledFunction (const Value *val)
 Return true if the argument in a function does not have a caller.
 
bool SVF::LLVMUtil::basicBlockHasRetInst (const BasicBlock *bb)
 Return true if the function has a return instruction.
 
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.
 
const ValueSVF::LLVMUtil::stripConstantCasts (const Value *val)
 Strip off the constant casts.
 
const ValueSVF::LLVMUtil::stripAllCasts (const Value *val)
 Strip off the all casts.
 
const ValueSVF::LLVMUtil::getFirstUseViaCastInst (const Value *val)
 
const ConstantExprSVF::LLVMUtil::isGepConstantExpr (const Value *val)
 Return corresponding constant expression, otherwise return nullptr.
 
const ConstantExprSVF::LLVMUtil::isInt2PtrConstantExpr (const Value *val)
 
const ConstantExprSVF::LLVMUtil::isPtr2IntConstantExpr (const Value *val)
 
const ConstantExprSVF::LLVMUtil::isCastConstantExpr (const Value *val)
 
const ConstantExprSVF::LLVMUtil::isSelectConstantExpr (const Value *val)
 
const ConstantExprSVF::LLVMUtil::isTruncConstantExpr (const Value *val)
 
const ConstantExprSVF::LLVMUtil::isCmpConstantExpr (const Value *val)
 
const ConstantExprSVF::LLVMUtil::isBinaryConstantExpr (const Value *val)
 
const ConstantExprSVF::LLVMUtil::isUnaryConstantExpr (const Value *val)
 
static DataLayoutSVF::LLVMUtil::getDataLayout (Module *mod)
 
void SVF::LLVMUtil::getNextInsts (const Instruction *curInst, std::vector< const Instruction * > &instList)
 Get the next instructions following control flow.
 
bool SVF::LLVMUtil::isNoPrecessorBasicBlock (const BasicBlock *bb)
 
bool SVF::LLVMUtil::isIRFile (const std::string &filename)
 Check whether a file is an LLVM IR file.
 
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.
 
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.
 
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.
 
std::string SVF::LLVMUtil::restoreFuncName (std::string funcName)
 
const SVFFunctionSVF::LLVMUtil::getFunction (const std::string &name)
 Get the corresponding Function based on its name.
 
bool SVF::LLVMUtil::isConstDataOrAggData (const Value *val)
 Return true if the value refers to constant data, e.g., i32 0.
 
const ValueSVF::LLVMUtil::getGlobalRep (const Value *val)
 find the unique defined global across multiple modules
 
bool SVF::LLVMUtil::isConstantObjSym (const SVFValue *val)
 Check whether this value points-to a constant object.
 
bool SVF::LLVMUtil::isConstantObjSym (const Value *val)
 Check whether this value points-to a constant object.
 
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::isStackAllocExtCallViaRet (const Instruction *inst)
 
bool SVF::LLVMUtil::isStackAllocExtCall (const Instruction *inst)
 
bool SVF::LLVMUtil::isHeapObj (const Value *val)
 
bool SVF::LLVMUtil::isStackObj (const Value *val)
 
bool SVF::LLVMUtil::isNonInstricCallSite (const Instruction *inst)
 Whether an instruction is a callsite in the application code, excluding llvm intrinsic calls.
 
const FunctionSVF::LLVMUtil::getProgEntryFunction (Module &module)
 Get program entry function from module.