mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-29 13:24:25 +00:00
Move the "findUsedStructTypes" functionality outside of the Module class.
The "findUsedStructTypes" method is very expensive to run. It needs to be optimized so that LTO can run faster. Splitting this method out of the Module class will help this occur. For instance, it can keep a list of seen objects so that it doesn't process them over and over again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161228 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -301,11 +301,6 @@ public:
|
||||
typedef DenseMap<StructType*, unsigned, DenseMapInfo<StructType*> >
|
||||
NumeredTypesMapTy;
|
||||
|
||||
/// findUsedStructTypes - Walk the entire module and find all of the
|
||||
/// struct types that are in use, returning them in a vector.
|
||||
void findUsedStructTypes(std::vector<StructType*> &StructTypes,
|
||||
bool OnlyNamed = false) const;
|
||||
|
||||
/// getTypeByName - Return the type with the specified name, or null if there
|
||||
/// is none by that name.
|
||||
StructType *getTypeByName(StringRef Name) const;
|
||||
|
Reference in New Issue
Block a user