37using namespace SVFUtil;
 
   53        if(SVFUtil::isa<ConstIntValVar>(
it.first) == 
false)
 
 
   65    if (SVFUtil::isa<SVFArrayType, SVFStructType>(
type))
 
   69    else if (
type->isPointerTy())
 
   80    else if (
type->isSingleValueType() || SVFUtil::isa<SVFFunctionType>(
type))
 
   87        assert(
false && 
"What other types for this gep?");
 
 
  112        assert(
false && 
"struct type can only pair with constant idx");
 
 
  145        assert(
type && 
"this GepStmt comes from ExternalAPI cannot call this api");
 
  152        else if (SVFUtil::isa<SVFPointerType>(
type))
 
 
  227        assert(SVFUtil::isa<ConstIntValVar>(
var) && 
"not a constant offset?");
 
  236        if(SVFUtil::isa<SVFPointerType>(
type))
 
  248                    SVFUtil::errs() << 
"It is an overflow access, hence it is the last idx\n";
 
 
  298            IdxOperandPairs::const_iterator 
it = 
pairVec.begin();
 
  302                return (*
it) < (*rhsIt);
 
 
  338    rawstr << 
",\tNum-Stride: {";
 
  340    IdxOperandPairs::const_iterator 
it = 
vec.begin();
 
  341    IdxOperandPairs::const_iterator 
eit = 
vec.end();
 
 
std::vector< IdxOperandPair > IdxOperandPairs
 
const SVFType * gepPointeeType
 
u32_t getStructFieldOffset(const SVFVar *idxOperandVar, const SVFStructType *idxOperandType) const
Return byte offset from the beginning of the structure to the field where it is located for struct ty...
 
bool addOffsetVarAndGepTypePair(const SVFVar *var, const SVFType *gepIterType)
 
u32_t getElementNum(const SVFType *type) const
Return element number of a type.
 
bool isConstantOffset() const
Return TRUE if this is a constant location set.
 
APOffset computeConstantByteOffset() const
 
std::string dump() const
Dump location set.
 
IdxOperandPairs idxOperandPairs
a vector of actual offset in the form of <SVF Var, iterator type>
 
APOffset getConstantStructFldIdx() const
Get methods.
 
AccessPath operator+(const AccessPath &rhs) const
Overload operators.
 
const SVFType * gepSrcPointeeType() const
 
NodeBS computeAllLocations() const
Compute all possible locations according to offset and number-stride pairs.
 
LSRelation checkRelation(const AccessPath &LHS, const AccessPath &RHS)
Check relations of two location sets.
 
APOffset fldIdx
Accumulated Constant Offsets.
 
const IdxOperandPairs & getIdxOperandPairVec() const
 
bool operator<(const AccessPath &rhs) const
 
APOffset computeConstantOffset() const
For example,.
 
u32_t getFlattenedElemIdx(const SVFType *T, u32_t origId)
Flattened element idx of an array or struct by considering stride.
 
u32_t getNumOfFlattenElements(const SVFType *T)
 
const StInfo * getTypeInfo(const SVFType *T) const
Get struct info.
 
static const Option< u32_t > MaxFieldLimit
Maximum number of field derivations for an object.
 
static SVFIR * getPAG(bool buildFromFile=false)
Singleton design here to make sure we only have one instance during any analysis.
 
std::string toString() const
 
std::vector< u32_t > & getFlattenedElemIdxVec()
 
std::ostream & errs()
Overwrite llvm::errs()
 
std::ostream & outs()
Overwrite llvm::outs()
 
llvm::IRBuilder IRBuilder