Skip to content

feat(local): delay evaluate memtransfer instructions#166

Open
LinerSu wants to merge 1 commit intoseahorn:mainfrom
LinerSu:delay-memtransfer
Open

feat(local): delay evaluate memtransfer instructions#166
LinerSu wants to merge 1 commit intoseahorn:mainfrom
LinerSu:delay-memtransfer

Conversation

@LinerSu
Copy link

@LinerSu LinerSu commented Oct 23, 2025

For memcpy calls, we run local analysis first, then evaluate instructions.
The transfer function avoids unifying cells for precision.
Enable via option --sea-dsa-delay-mem-transfer and inline functions before use.

m_dl.getTypeStoreSize(
I.getSource()->getType()->getPointerElementType()) ==
m_dl.getTypeStoreSize(
I.getDest()->getType()->getPointerElementType())) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Curious, will this logic (of getting size through pointer) work with LLVM 15 and above?

If no, is there an alternative so that porting becomes easier?

Copy link
Author

Choose a reason for hiding this comment

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

I don’t think so. I believe Kevin is working on a type inference algorithm to recover this information. Perhaps we can gain some insights from it.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is to be refined. With lazy memcpy handling, we can rely on inferred sizes rather than types.

Copy link
Contributor

@agurfinkel agurfinkel left a comment

Choose a reason for hiding this comment

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

Looks good. Left minor comments only

For memcpy calls, we run local analysis first, then evaluate instructions.
The transfer function avoids unifying cells for precision.
Enable via option `--sea-dsa-delay-mem-transfer` and inline functions before use.
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.

3 participants