summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2017-04-28 17:19:13 +0000
committerRui Ueyama <ruiu@google.com>2017-04-28 17:19:13 +0000
commitb882e5910dc3cd86c751d47d8160626a36e7cac6 (patch)
treed96cb99a3278937b335bd6aaddd3590072d0722d /llvm/lib/Bitcode
parent2dc8cb9f6bb5d81d92487a489ce5c0927418ca8f (diff)
downloadbcm5719-llvm-b882e5910dc3cd86c751d47d8160626a36e7cac6.tar.gz
bcm5719-llvm-b882e5910dc3cd86c751d47d8160626a36e7cac6.zip
Speed up the -Map option.
We found that some part of code for the -Map option takes O(m*n) where m is the number of input sections in some file and n is the number of symbols in the same file. If you do LTO, we usually have only a few object files as inputs for the -Map option feature, so this performance characteristic was worse than I expected. This patch rewrites the -Map option feature to speed it up. I eliminated the O(m*n) bottleneck and also used multi-threading. As a result, clang link time with the -Map option improved from 18.7 seconds to 11.2 seconds. Without -Map, it takes 7.7 seconds, so the -Map option is now about 3x faster than before for this test case (from 11.0 seconds to 3.5 seconds.) The generated output file size was 223 MiB, and the file contains 1.2M lines. Differential Revision: https://reviews.llvm.org/D32631 llvm-svn: 301659
Diffstat (limited to 'llvm/lib/Bitcode')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud