SVF icon indicating copy to clipboard operation
SVF copied to clipboard

In ConstraintEdge, is there a way to find corresponding LLVM instruction?

Open charlesxsh opened this issue 3 years ago • 3 comments

I am trying to analyzing a LLVM IR file with

Andersen pta(pag);
pta.analyze();

I know in PAG each edge/node can find corresponding LLVM value, is there a way for ConstraintEdge to find its corresponding LLVM instruction (I would like to see which LLVM instruction cause this constraint)?

charlesxsh avatar Mar 18 '21 22:03 charlesxsh

The initial constraint graph is a copy of PAG. However, the constraint graph can add copy edges during pointer analysis, but PAG will be fixed. The LLVM instruction information can be obtained through the toString() method of each PAGEdge

yuleisui avatar Mar 18 '21 22:03 yuleisui

Hi Yulei, thanks for the response. So suppose I have a ConstraintEdge, I cannot find LLVM value like what we can do for the PAGEdge.getValue() method right? Is there any way we can do that?

charlesxsh avatar Mar 19 '21 00:03 charlesxsh

No. This is because a constraint edge added (e.g., copy) during solving, may not correspond to an LLVM instruction.

yuleisui avatar Mar 19 '21 00:03 yuleisui