[all-commits] [llvm/llvm-project] 01f713: [libc++] Fix problems with GCC 13 and switch to it...

Tobias Hieta via All-commits all-commits at lists.llvm.org
Sun Aug 27 01:57:28 PDT 2023


  Branch: refs/heads/release/17.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 01f7134c0ea8caff86828df3f979726dffa33924
      https://github.com/llvm/llvm-project/commit/01f7134c0ea8caff86828df3f979726dffa33924
  Author: Nikolas Klauser <nikolasklauser at berlin.de>
  Date:   2023-08-27 (Sun, 27 Aug 2023)

  Changed paths:
    M libcxx/include/__type_traits/is_nothrow_constructible.h
    M libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp
    M libcxx/test/std/algorithms/robust_against_adl.compile.pass.cpp
    M libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char_array.pass.cpp
    M libcxx/test/std/utilities/meta/meta.rel/is_convertible.pass.cpp
    M libcxx/test/std/utilities/meta/meta.rel/is_convertible_fallback.pass.cpp
    M libcxx/utils/libcxx/test/params.py
    M libcxxabi/test/catch_member_function_pointer_02.pass.cpp

  Log Message:
  -----------
  [libc++] Fix problems with GCC 13 and switch to it in the CI

Reviewed By: #libc, #libc_abi, Mordante

Spies: arphaman, Mordante, libcxx-commits, arichardson

Differential Revision: https://reviews.llvm.org/D157060


  Commit: 231dab0e40e7f654bf65b9182d00df7b0f8f9551
      https://github.com/llvm/llvm-project/commit/231dab0e40e7f654bf65b9182d00df7b0f8f9551
  Author: Ian Anderson <iana at apple.com>
  Date:   2023-08-27 (Sun, 27 Aug 2023)

  Changed paths:
    M libcxx/docs/Contributing.rst
    M libcxx/test/libcxx/assertions/headers_declare_verbose_abort.gen.py
    M libcxx/test/libcxx/clang_tidy.gen.py
    M libcxx/test/libcxx/double_include.gen.py
    M libcxx/test/libcxx/header_inclusions.gen.py
    M libcxx/test/libcxx/libcpp_version.gen.py
    M libcxx/test/libcxx/module_std.gen.py
    M libcxx/test/libcxx/modules_include.gen.py
    M libcxx/test/libcxx/nasty_macros.gen.py
    M libcxx/test/libcxx/no_assert_include.gen.py
    M libcxx/test/libcxx/transitive_includes.gen.py
    A libcxx/utils/libcxx/header_information.py
    R libcxx/utils/libcxx/test/header_information.py

  Log Message:
  -----------
  [libc++] Move header_information.py up from tests

I need to use header_information.py in a generator script that isn't for tests in an upcoming change. Move it up a level so that it's in utils/libcxx instead of utils/libcxx/tests.

Differential Revision: https://reviews.llvm.org/D157639

# Conflicts:
#	libcxx/test/libcxx/system_reserved_names.gen.py


  Commit: ae498406499af87687d16efada56144f1639c424
      https://github.com/llvm/llvm-project/commit/ae498406499af87687d16efada56144f1639c424
  Author: Ian Anderson <iana at apple.com>
  Date:   2023-08-27 (Sun, 27 Aug 2023)

  Changed paths:
    M libcxx/include/module.modulemap.in

  Log Message:
  -----------
  [libc++][Modules] Remove unnecessary `requires` from the module map

Top level modules don't need `requires` because they're only built when their headers are included.

Reviewed By: ldionne, Mordante, #libc

Differential Revision: https://reviews.llvm.org/D157363


  Commit: 5e2c5225f8f4d22c2a220d984740a9cf37df80a9
      https://github.com/llvm/llvm-project/commit/5e2c5225f8f4d22c2a220d984740a9cf37df80a9
  Author: Ian Anderson <iana at apple.com>
  Date:   2023-08-27 (Sun, 27 Aug 2023)

  Changed paths:
    M libcxx/include/__std_clang_module
    M libcxx/test/libcxx/modules_include.gen.py
    M libcxx/utils/CMakeLists.txt
    A libcxx/utils/generate_std_clang_module_header.py
    M libcxx/utils/libcxx/header_information.py

  Log Message:
  -----------
  [libc++][Modules] Generate the __std_clang_module header

Use header_information to generate the __std_clang_module header. Instead of using lit_header_restrictions like the manually written header did, make a new header_include_requirements to codify what can be included rather than what can be fully tested.

Reviewed By: Mordante, #libc

Differential Revision: https://reviews.llvm.org/D157364

# Conflicts:
#	libcxx/utils/libcxx/header_information.py


  Commit: 0521244b24745ecbd098a8b0e02786f177dcb539
      https://github.com/llvm/llvm-project/commit/0521244b24745ecbd098a8b0e02786f177dcb539
  Author: Ian Anderson <iana at apple.com>
  Date:   2023-08-27 (Sun, 27 Aug 2023)

  Changed paths:
    M libcxx/include/__std_clang_module
    M libcxx/utils/generate_std_clang_module_header.py
    M libcxx/utils/libcxx/header_information.py

  Log Message:
  -----------
  [libc++][Modules] Simplify the __std_clang_module header generation

Post review feedback on D157364. Don't section the __std_clang_module header by macro, put the headers in alphabetical order and repeat the macro guards. Restore header_information.header_restrictions.

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D158133

# Conflicts:
#	libcxx/utils/libcxx/header_information.py


  Commit: f63cdbcc0cdccf14ac699207be6226b40b1751f8
      https://github.com/llvm/llvm-project/commit/f63cdbcc0cdccf14ac699207be6226b40b1751f8
  Author: Konstantin Varlamov <varconsteq at gmail.com>
  Date:   2023-08-27 (Sun, 27 Aug 2023)

  Changed paths:
    M libcxx/test/std/ranges/range.utility/range.utility.conv/to.pass.cpp

  Log Message:
  -----------
  [libc++][ranges] Fix `ranges::to` test.

- Make a test for an internal concept libc++-only;
- Make sure that `size` and `capacity` in a test container return the
  same type on all platforms.

(cherry picked from commit 8b9a98661b780a5b50d1d6a1f822d25e0c454382)


  Commit: 4114813bf2fe23f4be34633037230e7a2ec22701
      https://github.com/llvm/llvm-project/commit/4114813bf2fe23f4be34633037230e7a2ec22701
  Author: Konstantin Varlamov <varconsteq at gmail.com>
  Date:   2023-08-27 (Sun, 27 Aug 2023)

  Changed paths:
    M libcxx/test/std/utilities/template.bitset/bitset.members/op_or_eq.pass.cpp
    M libcxx/test/std/utilities/template.bitset/bitset.members/right_shift_eq.pass.cpp

  Log Message:
  -----------
  [libc++] Increase the constexpr steps limit on some `bitset` tests.

Prevent these tests from failing on some platforms (the number of
constexpr steps increased by https://reviews.llvm.org/D154860).

(cherry picked from commit 91876eab93a9f0ef29a339ed99bdb1c8ed1e85c6)


  Commit: 2641da8e1057d943b79bc4ea906ee6804ea9dace
      https://github.com/llvm/llvm-project/commit/2641da8e1057d943b79bc4ea906ee6804ea9dace
  Author: Ian Anderson <iana at apple.com>
  Date:   2023-08-27 (Sun, 27 Aug 2023)

  Changed paths:
    M libcxx/include/__locale_dir/locale_base_api/locale_guard.h

  Log Message:
  -----------
  [libc++][Modules] locale fails to compile with clang modules when _LIBCPP_LOCALE__L_EXTENSIONS is undefined

When `__locale_dir/locale_base_api/locale_guard.h is` compiled independently, as it is when it's in its own clang module, it fails to compile due to `locale_t` being undefined. It needs to include `__locale` to get that, instead of just `clocale`.

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D158669

(cherry picked from commit 6021c78fe55e3c4d3e073710bfe279c6a28566d4)


  Commit: f05226d7e38c36efe029a0eb4201b0843f81b5e8
      https://github.com/llvm/llvm-project/commit/f05226d7e38c36efe029a0eb4201b0843f81b5e8
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2023-08-27 (Sun, 27 Aug 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/CodeGen/CGCall.cpp
    M clang/lib/CodeGen/CGCoroutine.cpp
    M clang/lib/CodeGen/CodeGenFunction.h
    A clang/test/CodeGenCoroutines/coro-awaiter-noinline-suspend.cpp
    A clang/test/CodeGenCoroutines/pr56301.cpp

  Log Message:
  -----------
  [C++20] [Coroutines] Mark await_suspend as noinline if the awaiter is not empty

Close https://github.com/llvm/llvm-project/issues/56301
Close https://github.com/llvm/llvm-project/issues/64151

See the summary and the discussion of https://reviews.llvm.org/D157070
to get the full context.

As @rjmccall pointed out, the key point of the root cause is that
currently we didn't implement the semantics for '@llvm.coro.save' well
("after the await-ready returns false, the coroutine is considered to be
suspended ") well.
Since the semantics implies that we (the compiler) shouldn't write the
spills into the coroutine frame in the await_suspend. But now it is possible
due to some combinations of the optimizations so the semantics are
broken. And the inlining is the root optimization of such optimizations.
So in this patch, we tried to add the `noinline` attribute to the
await_suspend call.

Also as an optimization, we don't add the `noinline` attribute to the
await_suspend call if the awaiter is an empty class. This should be
correct since the programmers can't access the local variables in
await_suspend if the awaiter is empty. I think this is necessary for the
performance since it is pretty common.

Another potential optimization is:

    call @llvm.coro.await_suspend(ptr %awaiter, ptr %handle,
                                  ptr @awaitSuspendFn)

Then it is much easier to perform the safety analysis in the middle
end.
If it is safe to inline the call to awaitSuspend, we can replace it
in the CoroEarly pass. Otherwise we could replace it in the CoroSplit
pass.

Reviewed By: rjmccall

Differential Revision: https://reviews.llvm.org/D157833


  Commit: 6998ecd330f2b028bf4678edd4f53b5489c5e6df
      https://github.com/llvm/llvm-project/commit/6998ecd330f2b028bf4678edd4f53b5489c5e6df
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2023-08-27 (Sun, 27 Aug 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst

  Log Message:
  -----------
  [NFC] [C++20] [Coroutines] Mention the side effect of a fix may bring regressions

The fix we sent for https://github.com/llvm/llvm-project/issues/56301
may bring performance regressions. But we didn't mention it in the
ReleaseNotes so that users may get confused. e.g,
https://github.com/llvm/llvm-project/issues/64933. So this patch
mentions the possible side effect and the potential solutions in
https://github.com/llvm/llvm-project/issues/64945 to avoid
misunderstandings.


  Commit: 51844c6ca9330066dd24a9072cde9fd919b28e32
      https://github.com/llvm/llvm-project/commit/51844c6ca9330066dd24a9072cde9fd919b28e32
  Author: Denis Revunov <revunov.denis at huawei-partners.com>
  Date:   2023-08-27 (Sun, 27 Aug 2023)

  Changed paths:
    M bolt/lib/Rewrite/RewriteInstance.cpp
    M bolt/runtime/common.h
    M bolt/runtime/instr.cpp

  Log Message:
  -----------
  [BOLT][Instrumentation] Fix indirect call profile in PIE

Because indirect call tables use static addresses for call sites, but pc
values recorded by runtime may be subject to ASLR in PIE, we couldn't
find indirect call descriptions by their runtime address in PIE. It
resulted in [unknown] entries in profile for all indirect calls. We need
to substract base address of .text from runtime addresses to get the
corresponding static addresses. Here we create a getter for base address
of .text and substract it's return value from recorded PC values. It
converts them to static addresses, which then may be used to find the
corresponding indirect call descriptions.

Reviewed By: rafauler

Differential Revision: https://reviews.llvm.org/D154121

(cherry picked from commit a86dd9ae60662cfe9f9fb709a33c71d6fec66dfb)


  Commit: 3670e6a5c8a5f6a7665572c9d90bab9192f713eb
      https://github.com/llvm/llvm-project/commit/3670e6a5c8a5f6a7665572c9d90bab9192f713eb
  Author: Denis Revunov <revunov.denis at huawei-partners.com>
  Date:   2023-08-27 (Sun, 27 Aug 2023)

  Changed paths:
    M bolt/test/lit.cfg.py
    A bolt/test/runtime/instrumentation-indirect-2.c
    A bolt/test/runtime/wait_file.sh

  Log Message:
  -----------
  [BOLT][Instrumentation] Add test for append-pid option

Reviewed By: rafauler

Differential Revision: https://reviews.llvm.org/D154121

(cherry picked from commit dfc759929644ed1ea3224ab30e1086f7acc60da6)


  Commit: 77d7f7d769c63ade5c1697fffcd0a9e6d5f5261d
      https://github.com/llvm/llvm-project/commit/77d7f7d769c63ade5c1697fffcd0a9e6d5f5261d
  Author: Lei Huang <lei at ca.ibm.com>
  Date:   2023-08-27 (Sun, 27 Aug 2023)

  Changed paths:
    M libcxx/test/libcxx/numerics/c.math/constexpr-cxx23-clang.pass.cpp

  Log Message:
  -----------
  [PowerPC] Exclude frexp(long double) on linux

PowerPC on linux currently don't have support for lowering long double for
frexp().  Removing the tests until implementation is provided.

Reviewed By: #libc, amyk, Mordante

Differential Revision: https://reviews.llvm.org/D158547

(cherry picked from commit 5adac8bebcf26841c1d87227c5043af83a9ef94b)


  Commit: ef7421f3f74b44d78886d9e5e0891384251b20a0
      https://github.com/llvm/llvm-project/commit/ef7421f3f74b44d78886d9e5e0891384251b20a0
  Author: David Tellenbach <dtellenbach at apple.com>
  Date:   2023-08-27 (Sun, 27 Aug 2023)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
    A llvm/test/CodeGen/AArch64/emit_fneg_with_non_register_operand.mir

  Log Message:
  -----------
  [AArch64] Check opcode before trying to extract register from operand

When matching FNEG patterns for the MachineCombiner we need to check for
opcodes first, before trying to extract a register from an operand.
Otherwise handling of instructions with non-register operands causes the
compiler to crash.

Differential Revision: https://reviews.llvm.org/D158473

(cherry picked from commit 979e8ae4fce64546c65d24864eedd8165bc9787b)


  Commit: 0ec768e415b7468a66ab53fcbb78649a1d2474a8
      https://github.com/llvm/llvm-project/commit/0ec768e415b7468a66ab53fcbb78649a1d2474a8
  Author: Samuel Thibault <samuel.thibault at ens-lyon.org>
  Date:   2023-08-27 (Sun, 27 Aug 2023)

  Changed paths:
    M libcxx/src/chrono.cpp
    M libcxx/src/filesystem/filesystem_clock.cpp

  Log Message:
  -----------
  [libc++] Fix GNU/Hurd build

GNU/Hurd does have clock_gettime, it just doesn't define _POSIX_TIMERS because its support for timers is not complete.

Reviewed By: #libc, Mordante

Differential Revision: https://reviews.llvm.org/D158584

(cherry picked from commit 1cfcc36812ff7857567f7c729c22ae0e2be0fb3a)


  Commit: e91ad6b97fcbf74747126264bd4e07d6668f0f94
      https://github.com/llvm/llvm-project/commit/e91ad6b97fcbf74747126264bd4e07d6668f0f94
  Author: Rainer Orth <ro at gcc.gnu.org>
  Date:   2023-08-27 (Sun, 27 Aug 2023)

  Changed paths:
    M clang/lib/Driver/ToolChains/Solaris.cpp
    A clang/test/Driver/Inputs/solaris_sparc_tree/usr/gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2/crtbeginS.o
    A clang/test/Driver/Inputs/solaris_sparc_tree/usr/gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2/sparcv9/crtbeginS.o
    M clang/test/Driver/solaris-ld.c

  Log Message:
  -----------
  [Driver] Add PIE support on Solaris

`clang` currently lacks PIE support on Solaris.  This patch fixes this,
also linking with `crtbeginS.o` and `crtendS.o` for `-pie` and `-shared`.

Tested on `amd64-pc-solaris2.11`, `sparcv9-sun-solaris2.11`, and
`x86_64-pc-linux-gnu`.

Differential Revision: https://reviews.llvm.org/D158206

(cherry picked from commit 62945bb811169ffac7cf22c64b6dd3a3ad8d38f0)


Compare: https://github.com/llvm/llvm-project/compare/4b414e52ac10...e91ad6b97fcb


More information about the All-commits mailing list