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:
60e390c
)
[Pass][Layout] Make algorithm not n^2.
author
Michael J. Spencer
<bigcheesegs@gmail.com>
Tue, 12 Mar 2013 00:10:00 +0000
(
00:10
+0000)
committer
Michael J. Spencer
<bigcheesegs@gmail.com>
Tue, 12 Mar 2013 00:10:00 +0000
(
00:10
+0000)
This reduces the time spent in this function while linking ASTMatchersTests
from %43 to %2.4 of total link time.
llvm-svn: 176842
lld/lib/Passes/LayoutPass.cpp
patch
|
blob
|
history
diff --git
a/lld/lib/Passes/LayoutPass.cpp
b/lld/lib/Passes/LayoutPass.cpp
index
4f2a177
..
2bf43aa
100644
(file)
--- a/
lld/lib/Passes/LayoutPass.cpp
+++ b/
lld/lib/Passes/LayoutPass.cpp
@@
-390,6
+390,8
@@
void LayoutPass::buildOrdinalOverrideMap(MutableFile::DefinedAtomRange &range) {
uint64_t index = 0;
for (auto ai : range) {
const DefinedAtom *atom = ai;
+ if (_ordinalOverrideMap.find(atom) != _ordinalOverrideMap.end())
+ continue;
AtomToAtomT::iterator start = _followOnRoots.find(atom);
if (start != _followOnRoots.end()) {
for (const DefinedAtom *nextAtom = start->second; nextAtom != NULL;