diff options
| author | Ivan Krasin <krasin@chromium.org> | 2015-10-26 21:36:35 +0000 |
|---|---|---|
| committer | Ivan Krasin <krasin@chromium.org> | 2015-10-26 21:36:35 +0000 |
| commit | 298639a5fd6b8a7ce2360eb82e34bc1dc4c0ad82 (patch) | |
| tree | 9d9e3b5ab9c8a519d4f455f2b9ac32ea3527733d /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
| parent | 939f089242cd22a0192fd30ed4216f66e77b3cf6 (diff) | |
| download | bcm5719-llvm-298639a5fd6b8a7ce2360eb82e34bc1dc4c0ad82.tar.gz bcm5719-llvm-298639a5fd6b8a7ce2360eb82e34bc1dc4c0ad82.zip | |
Move imported entities into DwarfCompilationUnit to speed up LTO linking.
Summary:
In particular, this CL speeds up the official Chrome linking with LTO by
1.8x.
See more details in https://crbug.com/542426
Reviewers: dblaikie
Subscribers: jevinskie
Differential Revision: http://reviews.llvm.org/D13918
llvm-svn: 251353
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index b037a162cf1..a9dca447980 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -489,12 +489,7 @@ void DwarfDebug::beginModule() { auto *CUNode = cast<DICompileUnit>(N); DwarfCompileUnit &CU = constructDwarfCompileUnit(CUNode); for (auto *IE : CUNode->getImportedEntities()) - ScopesWithImportedEntities.push_back(std::make_pair(IE->getScope(), IE)); - // Stable sort to preserve the order of appearance of imported entities. - // This is to avoid out-of-order processing of interdependent declarations - // within the same scope, e.g. { namespace A = base; namespace B = A; } - std::stable_sort(ScopesWithImportedEntities.begin(), - ScopesWithImportedEntities.end(), less_first()); + CU.addImportedEntity(IE); for (auto *GV : CUNode->getGlobalVariables()) CU.getOrCreateGlobalVariableDIE(GV); for (auto *SP : CUNode->getSubprograms()) |

