[lld] r303797 - Improve parallelism of ICF.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed May 24 12:29:33 PDT 2017


Seems no real difference even on my beefy 20-core 40-thread machine,
probably because 256/n is still large today.

On Wed, May 24, 2017 at 12:25 PM, Davide Italiano <davide at freebsd.org>
wrote:

> On Wed, May 24, 2017 at 12:22 PM, Rui Ueyama via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > Author: ruiu
> > Date: Wed May 24 14:22:34 2017
> > New Revision: 303797
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=303797&view=rev
> > Log:
> > Improve parallelism of ICF.
> >
> > This is the only place we use threads for ICF. The intention of this code
> > was to split an input vector into 256 shards and process them in
> parallel.
> > What the code was actually doing was to split an input into 257 shards,
> > process the first 256 shards in parallel, and the remaining one in
> serial.
> >
> > That means this code takes ceil(256/n)+1 instead of ceil(256/n) where n
> > is the number of available CPU cores. The former converges to 2 while
> > the latter converges to 1.
> >
> > This patches fixes the above issue.
> >
>
> Nice. Any impact on performances?
>
> Thanks!
>
> --
> Davide
>
> "There are no solved problems; there are only problems that are more
> or less solved" -- Henri Poincare
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170524/792b0f70/attachment.html>


More information about the llvm-commits mailing list