File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -254,13 +254,23 @@ void AbstractExecution::updateStateOnCmp(const CmpStmt* cmp) {
254254 }
255255}
256256
257- // / Abstract state updates on an CallPE
258- void AbstractExecution::updateStateOnCall (const CallPE* call ) {
259- const ICFGNode* node = call ->getICFGNode ();
257+ // / Abstract state updates on an CallPE (phi-like: formal = join(actual1@cs1, actual2@cs2, ...))
258+ void AbstractExecution::updateStateOnCall (const CallPE* callPE ) {
259+ const ICFGNode* node = callPE ->getICFGNode ();
260260 AbstractState& as = getAbsStateFromTrace (node);
261- NodeID lhs = call->getLHSVarID ();
262- NodeID rhs = call->getRHSVarID ();
263- as[lhs] = as[rhs];
261+ NodeID res = callPE->getResID ();
262+ AbstractValue rhs;
263+ for (u32_t i = 0 ; i < callPE->getOpVarNum (); i++)
264+ {
265+ NodeID curId = callPE->getOpVarID (i);
266+ const ICFGNode* opICFGNode = callPE->getOpCallICFGNode (i);
267+ if (postAbsTrace.count (opICFGNode))
268+ {
269+ AbstractState& opAs = postAbsTrace[opICFGNode];
270+ rhs.join_with (opAs[curId]);
271+ }
272+ }
273+ as[res] = rhs;
264274}
265275
266276// / Abstract state updates on an RetPE
You can’t perform that action at this time.
0 commit comments