This is an archive of the discontinued LLVM Phabricator instance.

[llvm] Remove llvm::is_trivially_{copy/move}_constructible (NFC)
ClosedPublic

Authored by kazu on Aug 20 2022, 1:39 PM.

Details

Summary

This patch removes llvm::is_trivially_{copy/move}_constructible in
favor of std::is_trivially_{copy/move}_constructible.

The previous attempt to remove them in Dec 2020,
c8d406c93c5bb01599990201f78d8428dd29d289, broke builds with "some
versions of GCC" according to
6cd9608fb37ca2418fb44b57ec955bb5efe10689.

It's been 20 months since then, and the minimum requirement for GCC
has been updated to 7.1 from 5.1.

FWIW, I was able to build llvm with gcc 8.4.0.

Diff Detail

Event Timeline

kazu created this revision.Aug 20 2022, 1:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2022, 1:39 PM
kazu requested review of this revision.Aug 20 2022, 1:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2022, 1:39 PM
MaskRay accepted this revision.Aug 20 2022, 1:54 PM
This revision is now accepted and ready to land.Aug 20 2022, 1:54 PM
This revision was landed with ongoing or failed builds.Aug 20 2022, 2:06 PM
This revision was automatically updated to reflect the committed changes.

@kazu, build is still broken with GCC7.3 after this change.
Basically the old comment by @miyuki at https://reviews.llvm.org/D92543 is still valid as far as I see. It doesn't look like mentioned problems are addressed.
Can you revert please?

It seems GCC7.5 works fine though...

kazu added a comment.Sep 16 2022, 6:27 PM

@kazu, build is still broken with GCC7.3 after this change.
Basically the old comment by @miyuki at https://reviews.llvm.org/D92543 is still valid as far as I see. It doesn't look like mentioned problems are addressed.
Can you revert please?

Thank you for reporting the problem! I've reverted my change.

MaskRay added a comment.EditedJul 25 2023, 3:52 PM

GCC 7.5.0 has a bug that, without this change, many SmallVector with a std::pair element type like SmallVector<std::pair<Instruction * const, Info>, 0> X; lead to spurious

/tmp/opt/gcc-7.5.0/include/c++/7.5.0/type_traits:878:48: error: constructor required before non-static data member for ‘...’ has been parsed

I think we should reconsider doing this and probably bumping the GCC version requirement to at least 7.5.0.

I have compiled GCC 7.3. FWIW ninja -C /tmp/out/custom-gcc-7.3 check-llvm gives me many errors related to structured bindings.