[LLVMdev] Helping the optimizer along (__assume)

Duncan Sands baldrick at free.fr
Fri Oct 24 01:02:32 PDT 2008

> This isnt the same as GCC's builtin-expect, to my knowledge.
> Builtin_expect will leave branch prediction hints, but won't remove
> the branch. This would remove the branch. There was a discussion of
> adding this to GCC a long time ago
> (http://gcc.gnu.org/ml/gcc/2003-11/msg00324.html), but it looks like
> nothing came of it, though you probably know better than me.

The gcc VRP pass uses ASSERT_EXPR, which is the kind of thing being talked
about here, but ASSERT_EXPR didn't yet become something that front-ends can
generate: various parts of gcc still need to be taught about it.



More information about the llvm-dev mailing list