Skip to content

[IRGen][runtime] Simplify runtime CCs and entry point ABIs #14175

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

Conversation

gparker42
Copy link
Contributor

@gparker42 gparker42 commented Jan 26, 2018

  • Remove RegisterPreservingCC. It was unused.
  • Remove DefaultCC from the runtime. The distinction between C_CC and DefaultCC
    was unused and inconsistently applied. Separate C_CC and DefaultCC are
    still present in the compiler.
  • Remove function pointer indirection from runtime functions except those
    that are used by Instruments. The remaining Instruments interface is
    expected to change later due to function pointer liability.
  • Remove swift_rt_ wrappers. Function pointers are an ABI liability that we
    don't want, and there are better ways to get nonlazy binding if we need it.
    The fully custom wrappers were only needed for RegisterPreservingCC and
    for optimizing the Instruments function pointers.

rdar://35611235
rdar://35611185
rdar://36755525

… ABI.

* Remove RegisterPreservingCC. It was unused.
* Remove DefaultCC from the runtime. The distinction between C_CC and DefaultCC
  was unused and inconsistently applied. Separate C_CC and DefaultCC are
  still present in the compiler.
* Remove function pointer indirection from runtime functions except those
  that are used by Instruments. The remaining Instruments interface is
  expected to change later due to function pointer liability.
* Remove swift_rt_ wrappers. Function pointers are an ABI liability that we
  don't want, and there are better ways to get nonlazy binding if we need it.
  The fully custom wrappers were only needed for RegisterPreservingCC and
  for optimizing the Instruments function pointers.
@gparker42
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 8f3ebb6

@troughton
Copy link
Contributor

troughton commented Jan 26, 2018

Not a major point, but I think this touches a few areas that the TwoWordPair removal also touched. If the issue there was a simple missing SWIFT_CC, would it make sense to reapply that before this is merged and possibly have fewer merge conflicts?

@gparker42
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 8f3ebb6

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 8f3ebb6

@gparker42
Copy link
Contributor Author

gparker42 commented Jan 27, 2018

I suspect that the total number of merge conflicts would be about the same. This fix should prevent the problem that broke #13299 so we'll be able to reinstate that with no additional bug fixes.

@gparker42
Copy link
Contributor Author

@swift-ci please test macos

@gparker42
Copy link
Contributor Author

@swift-ci please test os x platform

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - f2fbaeb

@gparker42
Copy link
Contributor Author

@swift-ci please clean test os x platform

@gparker42 gparker42 merged commit e223f1f into swiftlang:master Jan 29, 2018
@gparker42 gparker42 deleted the GrP-PR-182784B2-348B-4F38-B6AC-42776F25D677 branch January 29, 2018 21:22
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