projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8914a6d
)
Use DenseMap instead of std::map in fixupExports
author
Reid Kleckner
<rnk@google.com>
Fri, 10 Nov 2017 19:12:01 +0000
(19:12 +0000)
committer
Reid Kleckner
<rnk@google.com>
Fri, 10 Nov 2017 19:12:01 +0000
(19:12 +0000)
Some DLLs have many exports, and this data structure shows up in the
profile of linking content.dll.
llvm-svn: 317910
lld/COFF/DriverUtils.cpp
patch
|
blob
|
history
diff --git
a/lld/COFF/DriverUtils.cpp
b/lld/COFF/DriverUtils.cpp
index
c03b972
..
6485699
100644
(file)
--- a/
lld/COFF/DriverUtils.cpp
+++ b/
lld/COFF/DriverUtils.cpp
@@
-594,7
+594,7
@@
void fixupExports() {
}
// Uniquefy by name.
-
std::map<StringRef, Export *> Map
;
+
DenseMap<StringRef, Export *> Map(Config->Exports.size())
;
std::vector<Export> V;
for (Export &E : Config->Exports) {
auto Pair = Map.insert(std::make_pair(E.ExportName, &E));