This is an archive of the discontinued LLVM Phabricator instance.

[libc++][PSTL] Reduce the amount of transitive includes
ClosedPublic

Authored by philnik on May 1 2023, 10:54 AM.

Details

Reviewers
ldionne
Group Reviewers
Restricted Project
Commits
rG91121ea6dc12: [libc++][PSTL] Reduce the amount of transitive includes

Diff Detail

Event Timeline

philnik created this revision.May 1 2023, 10:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 1 2023, 10:54 AM
Herald added a subscriber: miyuki. · View Herald Transcript
philnik requested review of this revision.May 1 2023, 10:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 1 2023, 10:54 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
philnik updated this revision to Diff 518591.May 1 2023, 4:05 PM

Generate files

philnik updated this revision to Diff 518780.May 2 2023, 9:58 AM

Try to fix CI

philnik updated this revision to Diff 518805.May 2 2023, 11:11 AM

Add removed transitive includes

ldionne accepted this revision.May 2 2023, 11:59 AM

LGTM w/ comments

libcxx/include/__algorithm/pstl_any_all_none_of.h
62–64

I would just use a lambda instead, since this is used only in two places. Otherwise, honestly I'd imagine someone finding __negate_function and "refactoring" it to std::not_fn.

libcxx/include/__pstl/internal/parallel_impl.h
36

I think I would still use std::atomic here, but I'd include <__atomic/atomic.h> instead. __atomic_base is arguably an implementation detail of std::atomic, and I don't think we should start using it widely in the rest of our code base. And in fact there's a few places that use std::__atomic_base right now in the synchronization library, and those could be refactored to use std::atomic (although those are IMO less vexing since the synchronization library is so close to <atomic>).

This revision is now accepted and ready to land.May 2 2023, 11:59 AM
philnik updated this revision to Diff 518855.May 2 2023, 1:54 PM
philnik marked 2 inline comments as done.

Address comments

philnik updated this revision to Diff 519079.May 3 2023, 8:07 AM

Generate files

philnik updated this revision to Diff 519152.May 3 2023, 10:24 AM

Fix stuff

This revision was landed with ongoing or failed builds.May 3 2023, 2:29 PM
This revision was automatically updated to reflect the committed changes.