5#include "llvm/ADT/BitVector.h"
6#include "llvm/ADT/StringRef.h"
7#include "llvm/IR/Argument.h"
8#include "llvm/IR/Function.h"
9#include "llvm/IR/Instructions.h"
10#include "llvm/IR/Operator.h"
11#include "llvm/IR/Type.h"
12#include "llvm/IR/Value.h"
13#include "llvm/Support/raw_ostream.h"
44 void set(llvm::Value *Val,
unsigned int Kind, std::string Index,
45 llvm::Function *Func,
bool Global =
false);
46 void set(llvm::Type *Ty,
unsigned int Kind, std::string Index);
47 void set(llvm::Argument *Arg,
unsigned int Kind, std::string Index,
48 llvm::Function *Func);
49 void set(std::string S,
unsigned int Kind, std::string Index,
50 llvm::Function *Func);
52 unsigned int TyLength;
55 void setIndex(llvm::GetElementPtrInst *GEPInst);
56 void setIndex(llvm::GEPOperator *GEPOp);
62 std::string
getIndex(llvm::GEPOperator *GEPOp);
64 Token(llvm::Value *Val, std::string Index =
"");
65 Token(llvm::GEPOperator *GOP, llvm::Function *Func, std::string Index =
"");
66 Token(llvm::Argument *Arg, std::string Index =
"");
67 Token(llvm::Type *Ty, std::string Index =
"");
68 Token(std::string S, llvm::Function *Func, std::string Index =
"");
73 llvm::StringRef
getName()
const;
85 bool sameFunc(llvm::Function *Func)
const;
120 void setTy(llvm::Type *);
void setIsFunArg()
Definition: Token.cpp:370
llvm::Type * getTy()
Definition: Token.cpp:399
friend std::ostream & operator<<(std::ostream &OS, const Token &A)
Definition: Token.cpp:209
bool getIsFunPtr()
Definition: Token.cpp:368
bool isField() const
isField - Returns true if alias is a field
Definition: Token.cpp:273
void operator=(const Token &TheToken)
Definition: Token.cpp:327
bool isValPointerType() const
Definition: Token.cpp:300
void resetIndex()
resetIndex - Resets the index back to an empty string
Definition: Token.cpp:148
bool getIsPhiGEPOpd()
Definition: Token.cpp:356
void setIndex(llvm::GetElementPtrInst *GEPInst)
setIndex - For a GEP Instruction find the offset and store it
Definition: Token.cpp:127
bool sameFunc(llvm::Function *Func) const
sameFunc = Returns true if the parent function of alias is same as /p Func
Definition: Token.cpp:282
bool isGEPOperandArrayTy(GOP *, int)
Definition: Token.cpp:172
bool isPointerType() const
void setIsIcmpGEPOpd()
Definition: Token.cpp:358
void resetIndexToZero()
resetIndexToZero - Resets the index to string zero for bitcast instr
Definition: Token.cpp:151
std::string getFunctionName() const
getFunctionName - Returns the name of the parent function
Definition: Token.cpp:253
bool operator<(const Token &TheToken) const
Definition: Token.cpp:319
bool getIsIcmpGEPOpd()
Definition: Token.cpp:360
void setIsArray()
Definition: Token.cpp:342
bool operator==(const Token &TheToken) const
Definition: Token.cpp:323
void setIsOpBitcast()
Definition: Token.cpp:350
Token()
Definition: Token.cpp:5
bool getIsFunArg()
Definition: Token.cpp:372
void setIsGlobal()
Definition: Token.cpp:340
void setIsFunPtr()
Definition: Token.cpp:366
void setFunction(llvm::Function *)
Definition: Token.cpp:403
llvm::StringRef getName() const
Definition: Token.cpp:231
std::string getFieldIndex() const
getFieldIndex - Returns index of the field
Definition: Token.cpp:261
void setIsRetGEP()
Definition: Token.cpp:374
void setIsAlloca()
Definition: Token.cpp:346
std::string getHash() const
Definition: Token.cpp:308
bool getIsAlloca()
Definition: Token.cpp:348
bool isBasePointerType() const
isBasePointerType - Returns true if the Token type's base type is a pointer
Definition: Token.cpp:289
llvm::Function * getFunction()
Definition: Token.cpp:405
bool isMem() const
isMem - Returns true if the alias denotes a location in heap
Definition: Token.cpp:264
bool isArg() const
isArg - Returns true if alias is a function argument
Definition: Token.cpp:270
void setIsPhiGEPOpd()
Definition: Token.cpp:354
bool getIsOpBitcast()
Definition: Token.cpp:352
bool isGlobalVar() const
isGlobalVar - Returns true if the alias is global
Definition: Token.cpp:267
bool getIsRetGEP()
Definition: Token.cpp:376
void setIsOneGEPIndx()
Definition: Token.cpp:362
std::vector< int > getGEPArrayIndex(GEP *)
void setTy(llvm::Type *)
Definition: Token.cpp:401
std::string getIndex(llvm::GEPOperator *GEPOp)
getIndex - For a GEP Operator find the offset
Definition: Token.cpp:157
bool isAllocaOrArgOrGlobal() const
Definition: Token.cpp:277
std::string getMemTypeName() const
getMemTypeName - Returns the memory type name
Definition: Token.cpp:243
llvm::Value * getValue() const
getValue - Returns the underlying Value* for the alias
Definition: Token.cpp:202
bool getIsOneGEPIndx()
Definition: Token.cpp:364
bool isNullToken()
Definition: Token.cpp:393
bool getIsArray()
Definition: Token.cpp:344
Definition: PointsToBenchmark.cpp:19
opTokenTy
Definition: Token.h:17
@ isFunPtr
Definition: Token.h:24
@ isIcmpGEPOpd
Definition: Token.h:22
@ isRetGEP
Definition: Token.h:26
@ isAlloca
Definition: Token.h:19
@ isArray
Definition: Token.h:18
@ isOneGEPIndx
Definition: Token.h:23
@ isFunArg
Definition: Token.h:25
@ isOpBitcast
Definition: Token.h:20
@ isPhiGEPOpd
Definition: Token.h:21