diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-10-09 06:05:40 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-10-09 06:05:40 +0000 |
| commit | 42dce1e365aafdd1c6543112632e20a858610577 (patch) | |
| tree | 3ddb0577160c9a15cbe903234f507bfe4df4f6d5 /llvm/lib/Bytecode/Reader/ReaderInternals.h | |
| parent | a9c297c8ea9ff8e45074ab93aee65f780f8f3b93 (diff) | |
| download | bcm5719-llvm-42dce1e365aafdd1c6543112632e20a858610577.tar.gz bcm5719-llvm-42dce1e365aafdd1c6543112632e20a858610577.zip | |
Eliminate the old LateResolveValues data structure, replacing it with a
new, simpler, ForwardReferences data structure. This is just the first
simple replacement, subsequent changes will improve the code more.
This simple change improves the performance of loading a file from HDF5
(contributed by Bill) from 2.36s to 1.93s, a 22% improvement. This
presumably has to do with the fact that we only create ONE placeholder for
a particular forward referenced values, and also may be because the data
structure is much simpler.
llvm-svn: 8979
Diffstat (limited to 'llvm/lib/Bytecode/Reader/ReaderInternals.h')
| -rw-r--r-- | llvm/lib/Bytecode/Reader/ReaderInternals.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Bytecode/Reader/ReaderInternals.h b/llvm/lib/Bytecode/Reader/ReaderInternals.h index 58ad8df8ceb..d53fcab2326 100644 --- a/llvm/lib/Bytecode/Reader/ReaderInternals.h +++ b/llvm/lib/Bytecode/Reader/ReaderInternals.h @@ -57,7 +57,6 @@ public: } void freeState() { freeTable(Values); - freeTable(LateResolveValues); freeTable(ModuleValues); } @@ -100,8 +99,9 @@ private: bool hasInternalMarkerOnly; // Only types of linkage are intern/external typedef std::vector<ValueList*> ValueTable; - ValueTable Values, LateResolveValues; + ValueTable Values; ValueTable ModuleValues; + std::map<std::pair<unsigned,unsigned>, Value*> ForwardReferences; std::vector<BasicBlock*> ParsedBasicBlocks; |

