Spatial
Simple Static Analysis in LLVM
|
#include <Token.h>
Public Member Functions | |
void | setIndex (llvm::GetElementPtrInst *GEPInst) |
setIndex - For a GEP Instruction find the offset and store it More... | |
void | setIndex (llvm::GEPOperator *GEPOp) |
setIndex - For a GEP Operator find the offset and store it More... | |
void | setIndex (Token *, std::string) |
void | setIndex (Token *) |
setIndex - For a Token More... | |
void | resetIndex () |
resetIndex - Resets the index back to an empty string More... | |
void | resetIndexToZero () |
resetIndexToZero - Resets the index to string zero for bitcast instr More... | |
void | resetIndexToZero (std::string) |
resetIndexToZero - Resets the index to string zero for nested bitcast instr More... | |
std::string | getIndex (llvm::GEPOperator *GEPOp) |
getIndex - For a GEP Operator find the offset More... | |
Token (llvm::Value *Val, std::string Index="") | |
Token (llvm::GEPOperator *GOP, llvm::Function *Func, std::string Index="") | |
Token (llvm::Argument *Arg, std::string Index="") | |
Token (llvm::Type *Ty, std::string Index="") | |
Token (std::string S, llvm::Function *Func, std::string Index="") | |
Token (Token *A) | |
Token () | |
llvm::Value * | getValue () const |
getValue - Returns the underlying Value* for the alias More... | |
llvm::StringRef | getName () const |
std::string | getMemTypeName () const |
getMemTypeName - Returns the memory type name More... | |
std::string | getFunctionName () const |
getFunctionName - Returns the name of the parent function More... | |
std::string | getFieldIndex () const |
getFieldIndex - Returns index of the field More... | |
bool | isMem () const |
isMem - Returns true if the alias denotes a location in heap More... | |
bool | isArg () const |
isArg - Returns true if alias is a function argument More... | |
bool | isField () const |
isField - Returns true if alias is a field More... | |
bool | isGlobalVar () const |
isGlobalVar - Returns true if the alias is global More... | |
bool | isAllocaOrArgOrGlobal () const |
bool | sameFunc (llvm::Function *Func) const |
sameFunc = Returns true if the parent function of alias is same as /p Func More... | |
bool | isBasePointerType () const |
isBasePointerType - Returns true if the Token type's base type is a pointer More... | |
bool | isValPointerType () const |
std::string | getHash () const |
bool | isPointerType () const |
bool | operator< (const Token &TheToken) const |
bool | operator== (const Token &TheToken) const |
void | operator= (const Token &TheToken) |
void | setIsGlobal () |
void | setIsArray () |
bool | getIsArray () |
void | setIsAlloca () |
bool | getIsAlloca () |
void | setIsOpBitcast () |
bool | getIsOpBitcast () |
void | setIsPhiGEPOpd () |
bool | getIsPhiGEPOpd () |
void | setIsIcmpGEPOpd () |
bool | getIsIcmpGEPOpd () |
void | setIsOneGEPIndx () |
bool | getIsOneGEPIndx () |
void | setIsFunPtr () |
bool | getIsFunPtr () |
void | setIsFunArg () |
bool | getIsFunArg () |
void | setIsRetGEP () |
bool | getIsRetGEP () |
template<typename GOP > | |
bool | isGEPOperandArrayTy (GOP *, int) |
template<typename GEP > | |
std::vector< int > | getGEPArrayIndex (GEP *) |
bool | isNullToken () |
void | setNullToken () |
llvm::Type * | getTy () |
void | setTy (llvm::Type *) |
void | setFunction (llvm::Function *) |
llvm::Function * | getFunction () |
template<typename GOP > | |
std::vector< int > | getGEPArrayIndex (GOP *G) |
Friends | |
std::ostream & | operator<< (std::ostream &OS, const Token &A) |
spatial::Token::Token | ( | llvm::Value * | Val, |
std::string | Index = "" |
||
) |
spatial::Token::Token | ( | llvm::GEPOperator * | GOP, |
llvm::Function * | Func, | ||
std::string | Index = "" |
||
) |
spatial::Token::Token | ( | llvm::Argument * | Arg, |
std::string | Index = "" |
||
) |
spatial::Token::Token | ( | llvm::Type * | Ty, |
std::string | Index = "" |
||
) |
spatial::Token::Token | ( | std::string | S, |
llvm::Function * | Func, | ||
std::string | Index = "" |
||
) |
spatial::Token::Token | ( | Token * | A | ) |
spatial::Token::Token | ( | ) |
std::string spatial::Token::getFieldIndex | ( | ) | const |
getFieldIndex - Returns index of the field
llvm::Function * spatial::Token::getFunction | ( | ) |
std::string spatial::Token::getFunctionName | ( | ) | const |
getFunctionName - Returns the name of the parent function
std::vector< int > spatial::Token::getGEPArrayIndex | ( | GEP * | ) |
std::vector< int > spatial::Token::getGEPArrayIndex | ( | GOP * | G | ) |
std::string spatial::Token::getHash | ( | ) | const |
getHash - Calculates the hash for alias to avoid multiple enteries of same alias
std::string spatial::Token::getIndex | ( | llvm::GEPOperator * | GEPOp | ) |
getIndex - For a GEP Operator find the offset
bool spatial::Token::getIsAlloca | ( | ) |
bool spatial::Token::getIsArray | ( | ) |
bool spatial::Token::getIsFunArg | ( | ) |
bool spatial::Token::getIsFunPtr | ( | ) |
bool spatial::Token::getIsIcmpGEPOpd | ( | ) |
bool spatial::Token::getIsOneGEPIndx | ( | ) |
bool spatial::Token::getIsOpBitcast | ( | ) |
bool spatial::Token::getIsPhiGEPOpd | ( | ) |
bool spatial::Token::getIsRetGEP | ( | ) |
std::string spatial::Token::getMemTypeName | ( | ) | const |
getMemTypeName - Returns the memory type name
llvm::StringRef spatial::Token::getName | ( | ) | const |
getName - Returns the name of alias with other informations like parent function etc
llvm::Type * spatial::Token::getTy | ( | ) |
llvm::Value * spatial::Token::getValue | ( | ) | const |
getValue - Returns the underlying Value* for the alias
bool spatial::Token::isAllocaOrArgOrGlobal | ( | ) | const |
isAllocaOrArgOrGlobal - Returns true if the alias is global, an argument or alloca
bool spatial::Token::isArg | ( | ) | const |
isArg - Returns true if alias is a function argument
bool spatial::Token::isBasePointerType | ( | ) | const |
isBasePointerType - Returns true if the Token type's base type is a pointer
bool spatial::Token::isField | ( | ) | const |
isField - Returns true if alias is a field
bool spatial::Token::isGEPOperandArrayTy | ( | GOP * | G, |
int | Idx | ||
) |
bool spatial::Token::isGlobalVar | ( | ) | const |
isGlobalVar - Returns true if the alias is global
bool spatial::Token::isMem | ( | ) | const |
isMem - Returns true if the alias denotes a location in heap
bool spatial::Token::isNullToken | ( | ) |
bool spatial::Token::isPointerType | ( | ) | const |
bool spatial::Token::isValPointerType | ( | ) | const |
bool spatial::Token::operator< | ( | const Token & | TheToken | ) | const |
void spatial::Token::operator= | ( | const Token & | TheToken | ) |
bool spatial::Token::operator== | ( | const Token & | TheToken | ) | const |
void spatial::Token::resetIndex | ( | ) |
resetIndex - Resets the index back to an empty string
void spatial::Token::resetIndexToZero | ( | ) |
resetIndexToZero - Resets the index to string zero for bitcast instr
void spatial::Token::resetIndexToZero | ( | std::string | S | ) |
resetIndexToZero - Resets the index to string zero for nested bitcast instr
bool spatial::Token::sameFunc | ( | llvm::Function * | Func | ) | const |
sameFunc = Returns true if the parent function of alias is same as /p Func
void spatial::Token::setFunction | ( | llvm::Function * | F | ) |
void spatial::Token::setIndex | ( | llvm::GEPOperator * | GEPOp | ) |
setIndex - For a GEP Operator find the offset and store it
void spatial::Token::setIndex | ( | llvm::GetElementPtrInst * | GEPInst | ) |
setIndex - For a GEP Instruction find the offset and store it
void spatial::Token::setIndex | ( | Token * | T, |
std::string | indx | ||
) |
setIndex - For a Token. Required in case of nested structures wherein the token belongs to a chain of GEP instructions
void spatial::Token::setIsAlloca | ( | ) |
void spatial::Token::setIsArray | ( | ) |
void spatial::Token::setIsFunArg | ( | ) |
void spatial::Token::setIsFunPtr | ( | ) |
void spatial::Token::setIsGlobal | ( | ) |
void spatial::Token::setIsIcmpGEPOpd | ( | ) |
void spatial::Token::setIsOneGEPIndx | ( | ) |
void spatial::Token::setIsOpBitcast | ( | ) |
void spatial::Token::setIsPhiGEPOpd | ( | ) |
void spatial::Token::setIsRetGEP | ( | ) |
void spatial::Token::setNullToken | ( | ) |
void spatial::Token::setTy | ( | llvm::Type * | type | ) |
|
friend |