Strip address information from byval type parameters.#42395
Merged
Conversation
Member
|
Why aren't you using similar code to the example link from LLVM? |
Member
Author
|
I think some APIs used there only work on LLVM 13; on 12 the code there is specific to byval: https://github.com/llvm/llvm-project/blob/llvmorg-12.0.1/llvm/lib/Transforms/Utils/ValueMapper.cpp#L901-L915 |
Member
|
I think this might apply to edit: Yeah https://github.com/llvm/llvm-project/blob/fed41342a82f5a3a9201819a82bf7a48313e296b/llvm/lib/Transforms/Utils/ValueMapper.cpp#L905 has sret as well. |
3fe180a to
cf652ee
Compare
84 tasks
vchuravy
approved these changes
Sep 29, 2021
LilithHafner
pushed a commit
to LilithHafner/julia
that referenced
this pull request
Feb 22, 2022
LilithHafner
pushed a commit
to LilithHafner/julia
that referenced
this pull request
Mar 8, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LLVM 12 introduced typed byval, but CloneFunctionInto does a plain copyAttributesFrom without rewriting contained types. The ValueMapper does the correct thing for calls though, so this looks like an oversight. But it's easy enough to fix that locally for now.