On 2018-05-23 01:47:05, Eric Engestrom wrote: > On Wednesday, 2018-05-23 00:25:11 -0700, Jordan Justen wrote: > > On 2018-05-22 14:52:28, Scott D Phillips wrote: > > > + > > > +#ifndef NDEBUG > > > +static void > > > +util_vma_heap_validate(struct util_vma_heap *heap) > > > +{ > > > > I'd rather have #ifndef NDEBUG for just the body of the function. I > > feel confident the compiler in release mode can optimize out an empty > > static function. > > While at it, I'm pretty sure the compiler can also optimise out an empty > loop, which is what this code compiles to with NDEBUG, so no guards > necessary at all?
That was discussed in v1. Scott even verified that GCC and clang optimized it away. I still think it is better to ifndef the code. -Jordan _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev