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)
commite41d7feaf55ab4ea31d0dad50b6c8df98bf30f43
tree39714ef998448b7e1f894053433266f34b82450d
parentc9f860d1242475d7f6a7e049b65ce0a2c39092a1
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%.

llvm-svn: 173512
clang/include/clang/Serialization/ModuleManager.h
clang/lib/Serialization/ModuleManager.cpp