summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2017-05-24 19:22:34 +0000
committerRui Ueyama <ruiu@google.com>2017-05-24 19:22:34 +0000
commitf04c04837c88068345f5141ebe6720ce3ae3d559 (patch)
tree6d605b03435b00558e020a3437d25a68bf0987ac /clang/lib/Frontend/CompilerInvocation.cpp
parent46fe6d47cca5cb7fd47186902612be0984c9a4c3 (diff)
downloadbcm5719-llvm-f04c04837c88068345f5141ebe6720ce3ae3d559.tar.gz
bcm5719-llvm-f04c04837c88068345f5141ebe6720ce3ae3d559.zip
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. llvm-svn: 303797
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud