Skip to content

Commit

Permalink
strong update for translating phi
Browse files Browse the repository at this point in the history
  • Loading branch information
jumormt committed Nov 29, 2023
1 parent b36c455 commit c6749de
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions svf/lib/AbstractExecution/SVFIR2ItvExeState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -911,35 +911,31 @@ void SVFIR2ItvExeState::translateSelect(const SelectStmt *select)
void SVFIR2ItvExeState::translatePhi(const PhiStmt *phi)
{
u32_t res = phi->getResID();
IntervalValue itv = IntervalValue::bottom();
AddressValue addr;
bool isItv = false, isAddr = false;
for (u32_t i = 0; i < phi->getOpVarNum(); i++)
{
NodeID curId = phi->getOpVarID(i);
if (inVarToIValTable(curId))
{
const IntervalValue &cur = _es[curId];
if (!inVarToIValTable(res))
{
_es[res] = cur;
}
else
{
_es[res].join_with(cur);
}
itv.join_with(_es[curId]);
isItv = true;
}
else if (inVarToAddrsTable(curId))
{
assert(!getVAddrs(curId).empty());
const VAddrs &cur = getVAddrs(curId);
if (!inVarToAddrsTable(res))
{
_es.getVAddrs(res) = cur;
}
else
{
_es.getVAddrs(res).join_with(cur);
}
addr.join_with(getVAddrs(curId));
isAddr = true;
} else {
// rhs not in the table
}
}
if(isItv) _es[res] = itv;
else if(isAddr) _es.getVAddrs(res) = addr;
else {
// rhs not in the table
}
}


Expand Down

0 comments on commit c6749de

Please sign in to comment.