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

Function pointer conversion #705

Merged
merged 1 commit into from
Jan 4, 2025
Merged

Conversation

caleridas
Copy link
Collaborator

Add function / pointer conversion llvm operators. Accept these operators as top-level nodes in the various transformation passes, and handle them in instruction conversion.

There are presently no "users" of these operators or anything that puts them into the graph -- so this is preparatory for making function and pointer distinction in a later commit.

@caleridas caleridas requested a review from phate January 3, 2025 10:16
@caleridas
Copy link
Collaborator Author

The operator names are quite verbose -- happy to abbreviate them if desired.

@caleridas caleridas force-pushed the function-pointer-conversion branch from 11a5f51 to 9df334b Compare January 3, 2025 10:18
Copy link
Owner

@phate phate left a comment

Choose a reason for hiding this comment

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

I am not sure whether I missed something, but I do not think you need to cast it to a simple node first before you cast it to a concrete node

jlm/llvm/Makefile.sub Outdated Show resolved Hide resolved
jlm/llvm/ir/operators/FunctionPointer.hpp Outdated Show resolved Hide resolved
jlm/llvm/ir/operators/FunctionPointer.hpp Outdated Show resolved Hide resolved
jlm/llvm/opt/InvariantValueRedirection.cpp Outdated Show resolved Hide resolved
@phate phate requested a review from haved January 3, 2025 22:35
@caleridas caleridas force-pushed the function-pointer-conversion branch 2 times, most recently from 512b6ad to e7dc862 Compare January 4, 2025 09:16
@caleridas caleridas requested a review from phate January 4, 2025 09:17
@caleridas caleridas force-pushed the function-pointer-conversion branch from e7dc862 to ece942f Compare January 4, 2025 10:10
phate
phate previously approved these changes Jan 4, 2025
Copy link
Owner

@phate phate left a comment

Choose a reason for hiding this comment

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

LGTM. I did not think about it the first time, but you might want to inherit it from unary_op class instead of from SimpleOperation.

@caleridas
Copy link
Collaborator Author

LGTM. I did not think about it the first time, but you might want to inherit it from unary_op class instead of from SimpleOperation.

Okay changed it, it forces in the unary reduction methods -- which is the thing you are reworking in another commit, though, so let's see.

@caleridas caleridas requested a review from phate January 4, 2025 20:18
phate
phate previously approved these changes Jan 4, 2025
@caleridas caleridas force-pushed the function-pointer-conversion branch from db52afd to 9c64ffa Compare January 4, 2025 21:42
Add function / pointer conversion llvm operators. Accept these operators
as top-level nodes in the various transformation passes, and handle them in
instruction conversion.

There are presently no "users" of these operators or anything that puts them
into the graph -- so this is preparatory for making function and pointer
distinction in a later commit.
@caleridas caleridas force-pushed the function-pointer-conversion branch from 9c64ffa to d970b7a Compare January 4, 2025 22:24
@caleridas caleridas merged commit 0235808 into master Jan 4, 2025
12 checks passed
@caleridas caleridas deleted the function-pointer-conversion branch January 4, 2025 22:57
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