Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove getbasevalvar in getgepval #1356

Merged
merged 3 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion svf-llvm/lib/SVFIRBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,7 @@ void SVFIRBuilder::sanityCheck()
*/
NodeID SVFIRBuilder::getGepValVar(const Value* val, const AccessPath& ap, const SVFType* elementType)
{
NodeID base = pag->getBaseValVar(getValueNode(val));
NodeID base = getValueNode(val);
NodeID gepval = pag->getGepValVar(curVal, base, ap);
if (gepval==UINT_MAX)
{
Expand Down
2 changes: 1 addition & 1 deletion svf/lib/SVFIR/SVFIR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ GepStmt* SVFIR::addVariantGepStmt(NodeID src, NodeID dst, const AccessPath& ap)
*/
NodeID SVFIR::addGepValNode(const SVFValue* curInst,const SVFValue* gepVal, const AccessPath& ap, NodeID i, const SVFType* type)
{
NodeID base = getBaseValVar(getValueNode(gepVal));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this function if it will never be used later.

NodeID base = getValueNode(gepVal);
//assert(findPAGNode(i) == false && "this node should not be created before");
assert(0==GepValObjMap[curInst].count(std::make_pair(base, ap))
&& "this node should not be created before");
Expand Down
Loading