Cache size of PassVector to speed up getNumContainedPasses().
authorEvan Cheng <evan.cheng@apple.com>
Mon, 12 Nov 2012 21:42:53 +0000 (21:42 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Mon, 12 Nov 2012 21:42:53 +0000 (21:42 +0000)
commit0655668b113950521c06b85ae81f0c592d755dbd
tree63bc2403ec9b6652f01fc5bef26c2ecb6dd80b56
parent3c9e55867e2c8ae7a9e528bce865ebfa963f30a9
Cache size of PassVector to speed up getNumContainedPasses().
getNumContainedPasses() used to compute the size of the vector on demand. It is
called repeated in loops (such as runOnFunction()) and it can be updated while
inside the loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167759 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/PassManagers.h
lib/VMCore/PassManager.cpp