summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ModuleManager.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Improve coordination between the module manager and the global moduleDouglas Gregor2013-01-251-5/+51
| | | | | | | | | index, optimizing the operation that skips lookup in modules where we know the identifier will not be found. This makes the global module index optimization actually useful, providing an 8.5% speedup over modules without the global module index for -fsyntax-only. llvm-svn: 173529
* Optimize ModuleManager::visit() by precomputing the visitation orderDouglas Gregor2013-01-251-65/+82
| | | | | | | | | | and limiting ourselves to two memory allocations. 10% speedup in -fsyntax-only time for modules. With this change, we can actually see some performance different from the global module index, but it's still about 1%. llvm-svn: 173512
* Implement the reader of the global module index and wire it into theDouglas Gregor2013-01-251-2/+3
| | | | | | | | | | | | | | | | | | | | | | | AST reader. The global module index tracks all of the identifiers known to a set of module files. Lookup of those identifiers looks first in the global module index, which returns the set of module files in which that identifier can be found. The AST reader only needs to look into those module files and any module files not known to the global index (e.g., because they were (re)built after the global index), reducing the number of on-disk hash tables to visit. For an example source I'm looking at, we go from 237844 total identifier lookups into on-disk hash tables down to 126817. Unfortunately, this does not translate into a performance advantage. At best, it's a wash once the global module index has been built, but that's ignore the cost of building the global module index (which is itself fairly large). Profiles show that the global module index code is far less efficient than it should be; optimizing it might give enough of an advantage to justify its continued inclusion. llvm-svn: 173405
* Give ModuleFiles an index, so that we can use indexed vectors ratherDouglas Gregor2013-01-211-20/+30
| | | | | | | than DenseMaps and SmallPtrSets for module-visitation data. ~2.6% speedup for modules. llvm-svn: 173081
* Actually keep track of the source locations at which particular moduleDouglas Gregor2012-11-301-4/+8
| | | | | | files are loaded. llvm-svn: 169027
* When loading a module fails because it is out of date, rebuild thatDouglas Gregor2012-11-071-0/+39
| | | | | | module in place. <rdar://problem/10138913> llvm-svn: 167539
* Set the file entry for a Module* that was created during deserializationArgyrios Kyrtzidis2012-10-031-1/+2
| | | | | | of a module file. llvm-svn: 165086
* Optimize unqualified/global name lookup in modules by introducing aDouglas Gregor2012-01-181-2/+3
| | | | | | | | | | generational scheme for identifiers that avoids searching the hash tables of a given module more than once for a given identifier. Previously, loading any new module invalidated all of the previous lookup results for all identifiers, causing us to perform the lookups repeatedly. llvm-svn: 148412
* Promote ModuleMap::Module to a namespace-scope class in the BasicDouglas Gregor2011-11-301-25/+25
| | | | | | | | | library, since modules cut across all of the libraries. Rename serialization::Module to serialization::ModuleFile to side-step the annoying naming conflict. Prune a bunch of ModuleMap.h includes that are no longer needed (most files only needed the Module type). llvm-svn: 145538
* Add support for viewing the module graph via Graphviz, for debuggingDouglas Gregor2011-10-111-0/+49
| | | | | | purposes. llvm-svn: 141697
* Factor the Module and ModuleManager classes out into separate headersDouglas Gregor2011-08-251-0/+204
and .cpp files, since ASTReader.cpp was getting way too large. No functionality change. llvm-svn: 138582
OpenPOWER on IntegriCloud