GlobalOpt: Don't optimize thread_local for initializers
authorDavid Majnemer <david.majnemer@gmail.com>
Thu, 26 Jun 2014 03:02:19 +0000 (03:02 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Thu, 26 Jun 2014 03:02:19 +0000 (03:02 +0000)
commit29640bcb7d7738e7e611b0150b6ac57e2d2b723f
tree81c70c56439220a7417280abe3657ed676384430
parentb0f5a0e7e7fb08f6ab97603ef68b4837f62755a0
GlobalOpt: Don't optimize thread_local for initializers

Folding a reference to a thread_local variable into another global
variable's initializer is very problematic, there is no relocation that
exists to represent such an access.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211762 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/GlobalOpt.cpp
test/Transforms/GlobalOpt/constantfold-initializers.ll