aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/FileOutputBuffer.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2015-03-06 00:22:48 +0000
committerRui Ueyama <ruiu@google.com>2015-03-06 00:22:48 +0000
commit25d5abdb3a0584e3f43e6979db37009dbda33521 (patch)
tree7547acb3fc2f970a270037ed88e1eaa79a544a98 /llvm/lib/Support/FileOutputBuffer.cpp
parentb202b27a22b5ae5327528e7810e0597e64a1d061 (diff)
downloadllvm-25d5abdb3a0584e3f43e6979db37009dbda33521.zip
llvm-25d5abdb3a0584e3f43e6979db37009dbda33521.tar.gz
llvm-25d5abdb3a0584e3f43e6979db37009dbda33521.tar.bz2
Optimize resolver by using std::unordered_multimap.
_reverseRef is a multimap from atoms to atoms. The map contains reverse edges of "layout-before" and "group" edges for dead-stripping. The type of the variable was DenseMap<Atom *, DenseSet<Atom *>>. This patch changes that to std::unordered_multimap<Atom *, Atom *>. A DenseMap with a value type of DenseSet was not fast. Inserting 900k items to the map took about 1.6 seconds on my workstation. unordered_multimap on the other hand took only 0.6 seconds. Use of the map also got faster -- originally markLive took 1.3 seconds in the same test case, and it now took 1.0 seconds. In total we shove off 1.3 seconds out of 27 seconds in that test case. llvm-svn: 231432
Diffstat (limited to 'llvm/lib/Support/FileOutputBuffer.cpp')
0 files changed, 0 insertions, 0 deletions