[libcxx-commits] [PATCH] D123175: [libcxx] Add flag to disable __builtin_assume in _LIBCPP_ASSERT

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 28 06:08:01 PDT 2023


ldionne added a comment.

In D123175#4427053 <https://reviews.llvm.org/D123175#4427053>, @aeubanks wrote:

> I was talking to some people about this and due to the way assumes are handled in the IR, it's not an automatic win to sprinkle assumes everywhere. There is inherently a tradeoff when you add assumes (assumes are instructions and are control flow dependent, adding assumes can prevent some optimizations) so they should be added carefully. Was there a concrete speedup seen when you initially landed this? But either way I think there needs to be a way to opt out of this behavior.

No, see https://discourse.llvm.org/t/llvm-assume-blocks-optimization/71609/11?u=ldionne.

I'll disable them by default -- this is nuts!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123175/new/

https://reviews.llvm.org/D123175



More information about the libcxx-commits mailing list