Skip to content
Commit e7c63c0e authored by Louis Dionne's avatar Louis Dionne
Browse files

[libc++] Stop using __builtin_assume in _LIBCPP_ASSERT

__builtin_assume can sometimes worsen code generation. For now, the
guideline seems to be to avoid adding assumptions without a clear
optimization intent. Since _LIBCPP_ASSERT is very general, we can't
have a clear optimization intent at this level, which makes
__builtin_assume the wrong tool for the job -- at least until
__builtin_assume is changed.

See https://discourse.llvm.org/t/llvm-assume-blocks-optimization/71609
for a discussion of this.

Differential Revision: https://reviews.llvm.org/D153968
parent b15ac1fd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment