[all-commits] [llvm/llvm-project] 0a77e6: [libcxx] Add flag to disable __builtin_assume in _...

aeubanks via All-commits all-commits at lists.llvm.org
Thu Apr 7 09:03:29 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0a77e633226b5598e426603c03e54d62ed275670
      https://github.com/llvm/llvm-project/commit/0a77e633226b5598e426603c03e54d62ed275670
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2022-04-07 (Thu, 07 Apr 2022)

  Changed paths:
    M libcxx/include/__assert
    M libcxx/test/libcxx/assertions/single_expression.sh.cpp

  Log Message:
  -----------
  [libcxx] Add flag to disable __builtin_assume in _LIBCPP_ASSERT

Introduce _LIBCPP_ASSERTIONS_DISABLE_ASSUME which makes _LIBCPP_ASSERT
not call __builtin_assume when _LIBCPP_ENABLE_ASSERTIONS == 0.

Calling __builtin_assume was introduced in D122397.

__builtin_assume is generally supposed to improve optimizations, but can
cause regressions when LLVM has trouble handling the calls to
`llvm.assume()` (see comments in D122397).

Reviewed By: philnik

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




More information about the All-commits mailing list