forked from OSchip/llvm-project
01b5f52140
This speeds up linking chrome.dll with PGO instrumentation by 13% (154271ms -> 134033ms). LLVM's Option library is very slow. In particular, it allocates at least one large-ish heap object (Arg) for every argument. When PGO instrumentation is enabled, all the __profd_* symbols are added to the @llvm.used list, which compiles down to these /INCLUDE: directives. This means we have O(#symbols) directives to parse in the section, so we end up allocating an Arg for every function symbol in the object file. This is unnecessary. To address the issue and speed up the link, extend the fast path that we already have for /EXPORT:, which has similar scaling issues. I promise that I took a hard look at optimizing the Option library, but its data structures are very general and would need a lot of cleanup. We have accumulated lots of optional features (option groups, aliases, multiple values) over the years, and these are now properties of every parsed argument, when the vast majority of arguments do not use these features. Reviewed By: thakis Differential Revision: https://reviews.llvm.org/D78845 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Chunks.cpp | ||
Chunks.h | ||
Config.h | ||
DLL.cpp | ||
DLL.h | ||
DebugTypes.cpp | ||
DebugTypes.h | ||
Driver.cpp | ||
Driver.h | ||
DriverUtils.cpp | ||
ICF.cpp | ||
ICF.h | ||
InputFiles.cpp | ||
InputFiles.h | ||
LLDMapFile.cpp | ||
LLDMapFile.h | ||
LTO.cpp | ||
LTO.h | ||
MapFile.cpp | ||
MapFile.h | ||
MarkLive.cpp | ||
MarkLive.h | ||
MinGW.cpp | ||
MinGW.h | ||
Options.td | ||
PDB.cpp | ||
PDB.h | ||
README.md | ||
SymbolTable.cpp | ||
SymbolTable.h | ||
Symbols.cpp | ||
Symbols.h | ||
TypeMerger.h | ||
Writer.cpp | ||
Writer.h |
README.md
See docs/NewLLD.rst