UseListOrder: Order GlobalValue uses after initializers
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 29 Jul 2014 23:06:14 +0000 (23:06 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Tue, 29 Jul 2014 23:06:14 +0000 (23:06 +0000)
commit9b9c19509fc7eb63f023915aaad063ebe1953d15
tree177a27b3f2ed095dc35bd4dcae56ab54f07131f1
parentabf3c77acb51c5dac5f349fa9893da7b144906f7
UseListOrder: Order GlobalValue uses after initializers

To avoid unnecessary forward references, the reader doesn't process
initializers of `GlobalValue`s until after the constant pool has been
processed, and then in reverse order.  Model this when predicting
use-list order.  This gets two more Bitcode tests passing with
`llvm-uselistorder`.

Part of PR5680.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214242 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Bitcode/Writer/ValueEnumerator.cpp
test/Bitcode/local-linkage-default-visibility.3.4.ll
test/Bitcode/old-aliases.ll