]> granicus.if.org Git - clang/commit
Optimize ModuleManager::visit() by precomputing the visitation order
authorDouglas Gregor <dgregor@apple.com>
Fri, 25 Jan 2013 22:25:23 +0000 (22:25 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 25 Jan 2013 22:25:23 +0000 (22:25 +0000)
commitd07865b42dcb32154c75134fded51b38cc55a0c4
tree80b256b1e5115d5116ef9a7ad8737ad8bc25474b
parent3d115cfd1b9c48155d478b1f2f14dba1b6ba9a91
Optimize ModuleManager::visit() by precomputing the visitation order
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%.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173512 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Serialization/ModuleManager.h
lib/Serialization/ModuleManager.cpp