Eliminate a major performance problem with chained PCH, where we were causing the deserialization of a large number of declarations when writing the visible-updates record for the translation unit in C. This takes us from:
Eliminate a major performance problem with chained PCH, where we were
causing the deserialization of a large number of declarations when
writing the visible-updates record for the translation unit in C. This
takes us from:

*** AST File Statistics:
  2 stat cache hits
  6 stat cache misses
  1/64463 source location entries read (0.001551%)
  15606/16956 types read (92.038216%)
  59266/89334 declarations read (66.342041%)
  38952/61393 identifiers read (63.446976%)
  0/7778 selectors read (0.000000%)
  24192/34644 statements read (69.830276%)
  388/8809 macros read (4.404586%)
  2095/5189 lexical declcontexts read (40.373867%)
  0/4587 visible declcontexts read (0.000000%)
  0/7716 method pool entries read (0.000000%)
  0 method pool misses

to

*** AST File Statistics:
  2 stat cache hits
  6 stat cache misses
  1/64463 source location entries read (0.001551%)
  26/16956 types read (0.153338%)
  18/89334 declarations read (0.020149%)
  145/61393 identifiers read (0.236183%)
  0/7778 selectors read (0.000000%)
  21/34644 statements read (0.060617%)
  0/8809 macros read (0.000000%)
  0/5189 lexical declcontexts read (0.000000%)
  0/4587 visible declcontexts read (0.000000%)
  0/7716 method pool entries read (0.000000%)
  0 method pool misses

when generating a chained PCH for a header that #includes Cocoa.h
(from a PCH file) and adds one simple function declaration. The
generated PCH file is now only 9580 bytes (down from > 2MB).


git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@125326 91177308-0d34-0410-b5e6-96231b3b80d8

apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang