Fix a horrible infloop in value tracking in the face of dead code.
authorChandler Carruth <chandlerc@gmail.com>
Mon, 4 Jan 2016 07:23:12 +0000 (07:23 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 4 Jan 2016 07:23:12 +0000 (07:23 +0000)
commitab99ec2ce71849d1976ac7497f671375a1900e97
tree24744eb213bbd3a432b41a6974bbea076d811c7b
parent15d448c8644faec5904d8a66e4a8b24642248a14
Fix a horrible infloop in value tracking in the face of dead code.

Amazingly, we just never triggered this without:
1) Moving code around for MetadataTracking so that a certain *different*
   amount of inlining occurs in the per-TU compile step.
2) Then you LTO opt or clang with a bootstrap, and get inlining, loop
   opts, and GVN line up everything *just* right.

I don't really know how we didn't hit this before. We really need to be
fuzz testing stuff, it shouldn't be hard to trigger. I'm working on
crafting a reduced nice test case, and will submit that when I have it,
but I want to get LTO build bots going again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256735 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ValueTracking.cpp