[LLVMbugs] [Bug 507] NEW: [archive reading] Dramatically speed up reading archives without a symtab
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sun Feb 13 10:22:00 PST 2005
http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=507
Summary: [archive reading] Dramatically speed up reading archives
without a symtab
Product: libraries
Version: 1.4
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Archive library
AssignedTo: unassignedbugs at nondot.org
ReportedBy: sabre at nondot.org
The code in Archive::findModulesDefiningSymbols that handles building a symbol
table for an archive without one is incredibly inefficient. There are two
reasons for this:
1. The GetBytecodeSymbols (exported by the Bytecode Reader) function used by
this method does not take a ModuleProvider, it takes either a filename or
a byte buffer.
The problem is that this causes findModulesDefiningSymbols to parse the
module from the archive file just to find its symbols.... then
immediately throw it away. It would be much better to use the
ModuleProvider that the archive already has, load into it, which will
avoid the reload of the data when needed later.
2. We should be able to entirely avoid reading the function bodies to build
the symbol table (which would speed up both llvm-ar/ranlib and
gccld/llvm-ld). To do this, we have to rearrange the bytecode slightly, so
that we know what linkage the functions will have without having to read
the function body (like globals, the linkage should be stored in the
ModuleGlobalInfo table).
Both of these changes will speed up linking a lot by reducing IO and by not
building large data structures that are never used.
-Chris
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list