[Mesa-dev] [PATCH 2/3] mesa: helper macros to enable per function optimisations

Timothy Arceri t_arceri at yahoo.com.au
Sat Nov 8 23:53:21 PST 2014


On Sun, 2014-11-09 at 07:48 +0330, Siavash Eliasi wrote:
> I know that's a time saver for developer (gcc function multi 
> versioning), however I still do prefer the approach (my own ^^ ) which 
> works on all setups regardless of hardware and compiler (well, any sane 
> compiler ICC, GCC, Clang,...).
> 
> Best regards,
> Siavash Eliasi.

This isn't about saving development time, and the whole point of it is
so things work *well* on all compilers. In an ideal world we wouldn't
have to do compiler specific things, but in the real world if you want
Mesa to be fast this is the right direction to go in.

To look at it another way putting different versions of functions in
another file is a hack too. At least this way we can have link time
optimisations, inlining improvements, etc. 

I think you may not be following what this patch is doing. This patch is
not an alternative to your patch, it works along side it. Your patch is
about runtime selection this patch is about compile time.




More information about the mesa-dev mailing list