diff options
author | Chris Lattner <sabre@nondot.org> | 2007-02-10 07:11:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-02-10 07:11:51 +0000 |
commit | b8cb5fe12c907e41b545d0ece5de3a9111b1e1d7 (patch) | |
tree | 5cb5de9315b67b62e61791f0d9340bbdea4f0e5e /lib/Bytecode | |
parent | f98aad66faf674244a9f3816b4f2106a1318a804 (diff) | |
download | external_llvm-b8cb5fe12c907e41b545d0ece5de3a9111b1e1d7.zip external_llvm-b8cb5fe12c907e41b545d0ece5de3a9111b1e1d7.tar.gz external_llvm-b8cb5fe12c907e41b545d0ece5de3a9111b1e1d7.tar.bz2 |
make the datastructure used in BytecodeWriter::outputValueSymbolTable
*slightly* less abusive of memory. This speeds up the bcwriter from
1.83s to 1.32s (39% faster) on 447.dealII.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34140 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode')
-rw-r--r-- | lib/Bytecode/Writer/Writer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp index 1c42044..bdd3ca4 100644 --- a/lib/Bytecode/Writer/Writer.cpp +++ b/lib/Bytecode/Writer/Writer.cpp @@ -1086,14 +1086,14 @@ void BytecodeWriter::outputValueSymbolTable(const ValueSymbolTable &VST) { true/*ElideIfEmpty*/); // Organize the symbol table by type - typedef std::pair<std::string, const Value*> PlaneMapEntry; + typedef std::pair<const std::string*, const Value*> PlaneMapEntry; typedef std::vector<PlaneMapEntry> PlaneMapVector; typedef std::map<const Type*, PlaneMapVector > PlaneMap; PlaneMap Planes; for (ValueSymbolTable::const_iterator SI = VST.begin(), SE = VST.end(); SI != SE; ++SI) - Planes[SI->second->getType()].push_back( - std::make_pair(SI->first,SI->second)); + Planes[SI->second->getType()] + .push_back(std::make_pair(&SI->first, SI->second)); for (PlaneMap::const_iterator PI = Planes.begin(), PE = Planes.end(); PI != PE; ++PI) { @@ -1112,7 +1112,7 @@ void BytecodeWriter::outputValueSymbolTable(const ValueSymbolTable &VST) { for (; I != End; ++I) { // Symtab entry: [def slot #][name] output_vbr(Table.getSlot(I->second)); - output(I->first); + output(*I->first); } } } |