Revert commit 158073 while waiting for a fix. The issue is that reassociate
authorDuncan Sands <baldrick@free.fr>
Fri, 8 Jun 2012 13:37:30 +0000 (13:37 +0000)
committerDuncan Sands <baldrick@free.fr>
Fri, 8 Jun 2012 13:37:30 +0000 (13:37 +0000)
commit69938a85bdbeef1c5b60aa778e361586bec36fb7
tree5a0a6b1d603c5ea39f7cc745c682426f453575e5
parent2563ad294fb27baaef2ef12f7829b8289c6925ae
Revert commit 158073 while waiting for a fix.  The issue is that reassociate
can move instructions within the instruction list.  If the instruction just
happens to be the one the basic block iterator is pointing to, and it is
moved to a different basic block, then we get into an infinite loop due to
the iterator running off the end of the basic block (for some reason this
doesn't fire any assertions).  Original commit message:

Grab-bag of reassociate tweaks.  Unify handling of dead instructions and
instructions to reoptimize.  Exploit this to more systematically eliminate
dead instructions (this isn't very useful in practice but is convenient for
analysing some testcase I am working on).  No need for WeakVH any more: use
an AssertingVH instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158199 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/Reassociate.cpp
test/Transforms/Reassociate/2012-06-08-InfiniteLoop.ll [new file with mode: 0644]