mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 05:32:28 +08:00
Performance: Add a set of visited SymbolFiles to the other FindFiles variant.
This is basically the same bug as in r260434. SymbolFileDWARF::FindTypes has exponential worst-case when digging through dependency DAG of .pcm files because each object file and .pcm file may depend on an already-visited .pcm file, which may again have dependencies. Fixed here by carrying a set of already visited SymbolFiles around. rdar://problem/56993424 Differential Revision: https://reviews.llvm.org/D70106
This commit is contained in:
@@ -1006,12 +1006,14 @@ void Module::FindTypes(
|
||||
}
|
||||
}
|
||||
|
||||
void Module::FindTypes(llvm::ArrayRef<CompilerContext> pattern,
|
||||
LanguageSet languages, TypeMap &types) {
|
||||
void Module::FindTypes(
|
||||
llvm::ArrayRef<CompilerContext> pattern, LanguageSet languages,
|
||||
llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
|
||||
TypeMap &types) {
|
||||
static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
|
||||
Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
|
||||
if (SymbolFile *symbols = GetSymbolFile())
|
||||
symbols->FindTypes(pattern, languages, types);
|
||||
symbols->FindTypes(pattern, languages, searched_symbol_files, types);
|
||||
}
|
||||
|
||||
SymbolFile *Module::GetSymbolFile(bool can_create, Stream *feedback_strm) {
|
||||
|
||||
Reference in New Issue
Block a user