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

Update LLVM #1336

Merged
merged 1 commit into from
Apr 19, 2024
Merged

Update LLVM #1336

merged 1 commit into from
Apr 19, 2024

Conversation

rjodinchr
Copy link
Collaborator

No description provided.

Copy link
Contributor

@ben-clayton ben-clayton left a comment

Choose a reason for hiding this comment

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

Thank you!

Copy link
Collaborator

@dneto0 dneto0 left a comment

Choose a reason for hiding this comment

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

LGTM.

@@ -126,7 +126,10 @@ PreservedAnalyses clspv::UndoByvalPass::run(Module &M,
// Update caller site.
for (auto User : Users) {
// Create new call instruction for new function without byval.
CallInst *Call = cast<CallInst>(User);
CallInst *Call = dyn_cast<CallInst>(User);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, it seems weird to have uses of the function F that aren't calls. But certainly we're only replacing the calls here, so it's fine to skip. Otherwise the code asserts out anyway.

But I'm curious about whether the test suite actually exercises this case. And if something does use F, what happens on the erase-from-parent down on line 157?

Copy link
Collaborator

@dneto0 dneto0 left a comment

Choose a reason for hiding this comment

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

This a net improvement. Approving

@rjodinchr rjodinchr merged commit 69e5c0b into google:main Apr 19, 2024
10 of 12 checks passed
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.

4 participants