[all-commits] [llvm/llvm-project] 6a684d: [Support] Remove llvm::is_trivially_{copy/move}_co...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Tue Jul 25 17:21:31 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6a684dbc4433a33e5f94fb15c9e378a2408021e0
https://github.com/llvm/llvm-project/commit/6a684dbc4433a33e5f94fb15c9e378a2408021e0
Author: Fangrui Song <i at maskray.me>
Date: 2023-07-25 (Tue, 25 Jul 2023)
Changed paths:
M llvm/include/llvm/ADT/FunctionExtras.h
M llvm/include/llvm/ADT/SmallVector.h
M llvm/include/llvm/Support/type_traits.h
M llvm/unittests/Support/TypeTraitsTest.cpp
M mlir/lib/Dialect/SparseTensor/IR/Detail/TemplateExtras.h
Log Message:
-----------
[Support] Remove llvm::is_trivially_{copy/move}_constructible
This restores D132311, which was reverted in
29c841ce93e087fa4e0c5f3abae94edd460bc24a (Sep 2022) due to certain files
not buildable with GCC 7.3.0. The previous attempt was reverted by
6cd9608fb37ca2418fb44b57ec955bb5efe10689 (Dec 2020).
This time, GCC 7.3.0 has existing build errors for a long time due to
structured bindings for many files, e.g.
```
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:9098:13: error: cannot decompose class type ‘std::pair<llvm::Value*, const llvm::SCEV*>’: both it and it
s base class ‘std::pair<llvm::Value*, const llvm::SCEV*>’ have non-static data members
for (auto [_, Stride] : Legal->getLAI()->getSymbolicStrides()) {
^~~~~~~~~~~
```
... and also some `error: duplicate initialization of` instances due to llvm/Transforms/IPO/Attributor.h.
---
GCC 7.5.0 has a bug that, without this change, certain `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
```
Switching to std::is_trivially_{copy/move}_constructible fixes the error.
More information about the All-commits
mailing list