awesomized / libmemcached

Resurrection of libmemcached
https://awesomized.github.io/libmemcached/
BSD 3-Clause "New" or "Revised" License
45 stars 26 forks source link

Scary -floop-parallelize-all option doesn't actually do anything except annoy package developers #3

Closed m6w6 closed 4 years ago

m6w6 commented 4 years ago

Imported from Launchpad using lp2gh.


One might think, reading the description of -floop-parallelize-all in the gcc manual, that -floop-parallelize-all will cause automatic parallelization of all loops by enabling a rarely-used, alpha-quality automatic parallelization feature called Graphite. However, this scary prospect is averted because -floop-parallelize-all doesn't actually generate parallel code unless you also specify -ftree-parallelize-loops=N where N is the thread count (that's right, it's fixed at compile time). This is explained at http://gcc.gnu.org/wiki/Graphite/Parallelization

So all -floop-parallelize-all does is cause the build to fail if libcloog is missing (i.e. bug #1232551), and increase compile time somewhat. I suggest that it be removed.

m6w6 commented 4 years ago

Note that according to http://gcc.gnu.org/wiki/Graphite/Parallelization and the linked document

http://gcc.gnu.org/wiki/AutoparRelated?action=AttachFile&do=get&target=autopar_performance_testresults.pdf

...auto-parallelization is extremely stupid, in that it will add a synchronisation overhead to every execution of every inner loop, even if the loop would complete on a single core in much less time than it takes to do the synchronisation. So there is a good chance that enabling it would actually slow down the application.