summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-02-17 21:52:44 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-02-17 21:52:44 +0000
commit4083e038e918ccc1a5800f424c3e814bdd425e79 (patch)
treef254d8df01cd7aecb0931cbcbc83d47129756e76 /clang/lib/Parse/ParseDecl.cpp
parentd4590c7304575702731b00749ae22e1298a98eba (diff)
downloadbcm5719-llvm-4083e038e918ccc1a5800f424c3e814bdd425e79.tar.gz
bcm5719-llvm-4083e038e918ccc1a5800f424c3e814bdd425e79.zip
[modules] Cache 'acceptable decl' lookups for namespaces. In projects with
thousands of modules, each of which declares the same namespace, linearly scanning the redecl chain looking for a visible declaration (once for each leaf module, for each use) performs very poorly. Namespace visibility can only decrease when we leave a module during a module build step, and we never care *which* visible declaration of a namespace we find, so we can cache this very effectively. This results in a 35x speedup on one of our internal build steps (2m -> 3.5s), but is hard to unit test because it requires a very large number of modules. Ideas for a test appreciated! No functionality change intended other than the speedup. llvm-svn: 261161
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud