Re: helping the compiler with asserts-hints to optimize

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23 April 2014 17:24, Agustin Perez Paladini wrote:
> Basically I was thinking in something like asserts, but that are only
> visible for the compiler and don't affect the code. Something like
>
> __builtin_assume(x > 0);
> __builtin_assume(x < 10);
>
> where x is a variable. That way the compiler can do better optimizations.

You can use __buitlin_expect and __builtin_unreachable to do that.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux