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

Adding support for vector operands (Patch 2) #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Adding support for vector operands (Patch 2) #74

wants to merge 1 commit into from

Conversation

Machiry
Copy link
Contributor

@Machiry Machiry commented Jul 6, 2018

Added changes to PAGBuilder to correctly handle store instructions, in case of vector operands.

Added changes to `PAGBuilder` to correctly handle store instructions, in case of vector operands.
// create dst node only if its required. i.e., if any of the element
// of the vector's value is a pointer type.
if(!dstCreated) {
vdst = getValueNode(inst.getPointerOperand());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shall we also consider whether the PointerOperand is a ConstantVector or not?

@yuleisui
Copy link
Collaborator

yuleisui commented Jul 9, 2018

Machiry,

I had a look at your patch. The vector instruction is a special one to SVF when building constraints and graphs. SVF is not able to handle ConstantVector and a few Vector Instructions (e.g., https://llvm.org/docs/LangRef.html#vector-operations) at this stage.

  1. Could we possibly break the ConstantVector into multiple instructions before our analysis, similar to what BreakConstantExpr does? This will be cleaner for backend analysis. Let me know your thoughts.

  2. Apart from your handling of store, we also need to handle load instructions.

  3. It seems to me you didn't consider the case that PointerOperand is also a ConstantVector (see code comments)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants