-
Notifications
You must be signed in to change notification settings - Fork 88
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
Update LLVM #1336
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
There was a problem hiding this 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); |
There was a problem hiding this comment.
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?
There was a problem hiding this 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
No description provided.