Do a topological sort of the types before writing them out.

This takes the linking of libxul on linux from 6m54.931s to 5m39.840s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129009 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2011-04-06 16:49:37 +00:00
parent 714b34fc24
commit f5a90561b0
3 changed files with 71 additions and 29 deletions

View File

@ -197,7 +197,7 @@ static void WriteTypeTable(const ValueEnumerator &VE, BitstreamWriter &Stream) {
// Loop over all of the types, emitting each in turn.
for (unsigned i = 0, e = TypeList.size(); i != e; ++i) {
const Type *T = TypeList[i].first;
const Type *T = TypeList[i];
int AbbrevToUse = 0;
unsigned Code = 0;