Skip to content

[IRGen] Added function pointer to direct async FunctionPointer instances. #36764

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

Conversation

nate-chandler
Copy link
Contributor

@nate-chandler nate-chandler commented Apr 6, 2021

The address of the function to be called when generating code to invoke the function associated with FunctionPointer which is produced via direct reference is by definition statically known; it is neither necessary nor desireable to load this address out of the AsyncFunctionPointer corresponding to the function.

Here, that spurious additional work is skipped. The approach is to add a second value to the FunctionPointer struct. For FunctionPointers whose kind is AsyncFunctionPointer, this value is either null or else the address of the corresponding function.

rdar://71376092

@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler nate-chandler force-pushed the concurrency/irgen/rdar71376092 branch from c194703 to cf29a54 Compare April 6, 2021 23:06
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler
Copy link
Contributor Author

@swift-ci please test windows platform

1 similar comment
@nate-chandler
Copy link
Contributor Author

@swift-ci please test windows platform

@swift-ci
Copy link
Contributor

swift-ci commented Apr 7, 2021

Build failed
Swift Test OS X Platform
Git Sha - cf29a54320b4273505b37f273f8d6895abd5d163

@nate-chandler
Copy link
Contributor Author

@swift-ci please test macos platform

@nate-chandler
Copy link
Contributor Author

@swift-ci please test windows platform

@swift-ci
Copy link
Contributor

swift-ci commented Apr 7, 2021

Build failed
Swift Test OS X Platform
Git Sha - cf29a54320b4273505b37f273f8d6895abd5d163

@nate-chandler
Copy link
Contributor Author

@swift-ci please test windows platform

@nate-chandler
Copy link
Contributor Author

@swift-ci please clean test macos platform

@swift-ci
Copy link
Contributor

swift-ci commented Apr 7, 2021

Build failed
Swift Test OS X Platform
Git Sha - cf29a54320b4273505b37f273f8d6895abd5d163

@swift-ci
Copy link
Contributor

swift-ci commented Apr 7, 2021

Build failed
Swift Test Linux Platform
Git Sha - cf29a54320b4273505b37f273f8d6895abd5d163

@nate-chandler
Copy link
Contributor Author

@swift-ci please test linux platform

@nate-chandler
Copy link
Contributor Author

@swift-ci please test macos platform

@swift-ci
Copy link
Contributor

swift-ci commented Apr 7, 2021

Build failed
Swift Test OS X Platform
Git Sha - cf29a54320b4273505b37f273f8d6895abd5d163

@nate-chandler
Copy link
Contributor Author

@swift-ci please clean test macos platform

@swift-ci
Copy link
Contributor

swift-ci commented Apr 7, 2021

Build failed
Swift Test Linux Platform
Git Sha - cf29a54320b4273505b37f273f8d6895abd5d163

@nate-chandler
Copy link
Contributor Author

@swift-ci please clean test linux platform

@swift-ci
Copy link
Contributor

swift-ci commented Apr 7, 2021

Build failed
Swift Test OS X Platform
Git Sha - cf29a54320b4273505b37f273f8d6895abd5d163

@nate-chandler
Copy link
Contributor Author

@swift-ci please clean test macos platform

@nate-chandler
Copy link
Contributor Author

@swift-ci please clean test windows platform

@swift-ci
Copy link
Contributor

swift-ci commented Apr 7, 2021

Build failed
Swift Test Linux Platform
Git Sha - cf29a54320b4273505b37f273f8d6895abd5d163

@nate-chandler
Copy link
Contributor Author

@swift-ci please clean test linux platform

@swift-ci
Copy link
Contributor

swift-ci commented Apr 7, 2021

Build failed
Swift Test Linux Platform
Git Sha - cf29a54320b4273505b37f273f8d6895abd5d163

@nate-chandler nate-chandler changed the title [IRGen] Added fn ptr to async FunctionPointer. [IRGen] Added function pointer to direct async FunctionPointer instances. Apr 7, 2021
@nate-chandler
Copy link
Contributor Author

@swift-ci please clean test linux platform

@swift-ci
Copy link
Contributor

swift-ci commented Apr 7, 2021

Build failed
Swift Test Linux Platform
Git Sha - cf29a54320b4273505b37f273f8d6895abd5d163

Copy link
Contributor

@aschwaighofer aschwaighofer left a comment

Choose a reason for hiding this comment

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

LGTM

@nate-chandler
Copy link
Contributor Author

@swift-ci please clean test linux platform

@nate-chandler
Copy link
Contributor Author

@swift-ci please test windows platform

@nate-chandler
Copy link
Contributor Author

@swift-ci please clean test windows platform

@swift-ci
Copy link
Contributor

swift-ci commented Apr 7, 2021

Build failed
Swift Test Linux Platform
Git Sha - cf29a54320b4273505b37f273f8d6895abd5d163

The address of the function to be called when generating code to invoke
the function associated with FunctionPointer which is produced via
direct reference is by definition statically known; it is neither necessary
nor desireable to load this address out of the AsyncFunctionPointer
corresponding to the function.

Here, that spurious additional work is skipped.  The approach is to add
a second value to the FunctionPointer struct.  For FunctionPointers
whose kind is AsyncFunctionPointer, this value is either null or else
the address of the corresponding function.

rdar://71376092
@nate-chandler nate-chandler force-pushed the concurrency/irgen/rdar71376092 branch from cf29a54 to 4d56b62 Compare April 7, 2021 23:11
@nate-chandler
Copy link
Contributor Author

@swift-ci please test and merge

@nate-chandler
Copy link
Contributor Author

@swift-ci please test windows

@nate-chandler
Copy link
Contributor Author

@swift-ci please test macos platform

@swift-ci swift-ci merged commit 061daa8 into swiftlang:main Apr 8, 2021
@nate-chandler nate-chandler deleted the concurrency/irgen/rdar71376092 branch April 8, 2021 15:12
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.

3 participants