Skip to content

[CF] Expose flsl and narrow scope of popcountll. #2621

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 2 commits into from
Jan 22, 2020

Conversation

3405691582
Copy link
Member

This PR encloses two primarily mechanical commits that deal with the scoping of the implementations of two intrinsic/like functions.

  • Prefix defines popcountll for Linux and Windows. The only references to
    popcountll exist in CFBurstTrie, and the Prefix implementation is only
    used there when TARGET_OS_WIN32. Therefore, there's no need to expose
    this outside of Windows.

  • flsl is available on FreeBSD (and thus macOS), but not OpenBSD. This
    commit makes the implementation of flsl currently exposed to Linux and
    Windows also available to OpenBSD.

Prefix defines popcountll for Linux and Windows. The only references to
popcountll exist in CFBurstTrie, and the Prefix implementation is only
used there when TARGET_OS_WIN32. Therefore, there's no need to expose
this outside of Windows.
flsl is available on FreeBSD (and thus macOS), but not OpenBSD. This
commit makes the implementation of flsl currently exposed to Linux and
Windows also available to OpenBSD. Thus, we can move this implementation
up to the existing block of shared infrastructure.

Additionally, this commit separates it from the block below which
declares asprintf. The asprintf declaration is still required for Linux
and Windows, but not OpenBSD.

While we are here, move an existing comma loop body to explicit braces.
@3405691582 3405691582 force-pushed the Prefix_ExposeIntrinsics branch from 2edc38f to f631bd6 Compare January 21, 2020 20:48
@spevans
Copy link
Contributor

spevans commented Jan 21, 2020

@swift-ci test

@compnerd compnerd merged commit c354f55 into swiftlang:master Jan 22, 2020
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