Use a map to cache the ModuleType information, so we can do logarithmic
authorChris Lattner <sabre@nondot.org>
Mon, 3 Oct 2005 21:26:53 +0000 (21:26 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 3 Oct 2005 21:26:53 +0000 (21:26 +0000)
commiteebac5fee6374f3ad10ff1c9ff710411673e8c89
tree31ef59e6785780bb7ab781511917f01c7a6aabb1
parent8ba732bb1c21059153215a1cbe664a1db9293e1f
Use a map to cache the ModuleType information, so we can do logarithmic
lookups instead of linear time lookups.  This speeds up bc parsing of a
large file from

137.834u 118.256s 4:27.96
to
132.611u 114.436s 4:08.53

with a release build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23611 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Bytecode/Reader/Reader.cpp
lib/Bytecode/Reader/Reader.h