Skip to content

IRGen: Pass the elementType of pointers through to operations #61232

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

Merged
merged 3 commits into from
Oct 4, 2022

Conversation

aschwaighofer
Copy link
Contributor

In preparation for moving to llvm's opaque pointer representation replace getPointerElementType and CreateCall/CreateLoad/Store uses that dependent on the address operand's pointer element type.

This means an Address carries the element type and we use FunctionPointer in more places or read the function type off the llvm::Function.

@aschwaighofer
Copy link
Contributor Author

@swift-ci test

@aschwaighofer aschwaighofer marked this pull request as draft September 21, 2022 21:12
@aschwaighofer
Copy link
Contributor Author

@swift-ci test

@aschwaighofer
Copy link
Contributor Author

@swift-ci test

@aschwaighofer
Copy link
Contributor Author

@swift-ci test

@aschwaighofer
Copy link
Contributor Author

@swift-ci test

@aschwaighofer
Copy link
Contributor Author

@swift-ci test source compat

@aschwaighofer
Copy link
Contributor Author

@swift-ci test linux

@aschwaighofer
Copy link
Contributor Author

@swift-ci test

@aschwaighofer
Copy link
Contributor Author

@swift-ci test source compat

In preparation for moving to llvm's opaque pointer representation
replace getPointerElementType and CreateCall/CreateLoad/Store uses that
dependent on the address operand's pointer element type.

This means an `Address` carries the element type and we use
`FunctionPointer` in more places or read the function type off the
`llvm::Function`.
This should be computed by SignatureExpansion in a more correct way.
The code here seems suspiciously off in the case we have both a direct
return result and one indirect return result.
@aschwaighofer aschwaighofer changed the title [DNM] IRGen: Pass the elementType of pointers through to operations IRGen: Pass the elementType of pointers through to operations Oct 4, 2022
@aschwaighofer aschwaighofer marked this pull request as ready for review October 4, 2022 13:24
@aschwaighofer
Copy link
Contributor Author

@swift-ci test

@aschwaighofer
Copy link
Contributor Author

@swift-ci test source compat

@aschwaighofer aschwaighofer merged commit 3905955 into swiftlang:main Oct 4, 2022
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.

1 participant