mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
Use a map to cache the ModuleType information, so we can do logarithmic
lookups instead of linear time lookups. This speeds up bc parsing of a large file from 137.834u 118.256s 4:27.96 to 132.611u 114.436s 4:08.53 with a release build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23611 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -333,6 +333,12 @@ private:
|
||||
/// @brief This vector is used to deal with forward references to types in
|
||||
/// a module.
|
||||
TypeListTy ModuleTypes;
|
||||
|
||||
/// @brief This is an inverse mapping of ModuleTypes from the type to an
|
||||
/// index. Because refining types causes the index of this map to be
|
||||
/// invalidated, any time we refine a type, we clear this cache and recompute
|
||||
/// it next time we need it. These entries are ordered by the pointer value.
|
||||
std::vector<std::pair<const Type*, unsigned> > ModuleTypeIDCache;
|
||||
|
||||
/// @brief This vector is used to deal with forward references to types in
|
||||
/// a function.
|
||||
|
Reference in New Issue
Block a user