Conversation
| } | ||
|
|
||
| /// insert IR Name and Source Name mapping | ||
| void ReplaceIRVar::insert(std::string Name){ |
There was a problem hiding this comment.
Would you like to create a separate pull request for the changes related to replace IR vars?
lib/Token/TokenWrapper.cpp
Outdated
| if (llvm::isa<llvm::LoadInst>(Inst)) | ||
| return {1, 2}; | ||
| return {1, 1}; | ||
| /// extractPHINodeToken - Returns aliases for the PHINode instruction |
There was a problem hiding this comment.
I'll take a look at phi node-related changes after we are good with nullptr support. It looks like the proposed implementation assumes phi nodes will have 2 operands always which is not true.
lib/Token/TokenWrapper.cpp
Outdated
| llvm::Value *ValOp = Inst->getValueOperand(); | ||
| if (!llvm::isa<llvm::ConstantInt>(ValOp)) | ||
| TokenVec.push_back(this->getToken(ValOp)); | ||
| // if (!llvm::isa<llvm::ConstantInt>(ValOp)) |
include/Token/TokenWrapper.h
Outdated
| /// extractStatementType - Returns the relative level of redirection based of | ||
| /// LHS and RHS on the statement | ||
| template <typename Ty> | ||
| std::pair<int, int> TokenWrapper::extractStatementType(Ty *Inst) { |
There was a problem hiding this comment.
This logic has now moved to InstModel/GenericInstModel/GenericInstModel.cpp, you may want to do your changes there
include/Graph/Graph.h
Outdated
| for (auto Src : this->getPointee(Src)) { | ||
| for (auto Dest : this->getPointee(Dest)) { | ||
| this->insert(Src, Dest); | ||
| if(Dest->isNull()){ |
There was a problem hiding this comment.
Points-to graph need not know anything about nullptr. We should treat nullptr as a location in the heap and should keep redirection level 0 for it.
reSHARMA
left a comment
There was a problem hiding this comment.
Nullptr support looks good, I've suggested some changes.
I'll suggest changes for the rest later.
ayush-qubit
left a comment
There was a problem hiding this comment.
I have done changes that you suggested.
This pull request is for Null Pointer support