Fix a silly coding error on my part. The whole point of the speculator
authorChandler Carruth <chandlerc@gmail.com>
Tue, 2 Oct 2012 17:49:47 +0000 (17:49 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 2 Oct 2012 17:49:47 +0000 (17:49 +0000)
commit3903e05244c19e8ad0c59882cb2dccc5a132c1cd
treeb1a9a9b24d34005ecbe0b6d2cb145a2d6e9e1e80
parentea0c5ecb28ffc3bad449c53a71aebbc9849c5faf
Fix a silly coding error on my part. The whole point of the speculator
being separate was that it can grow the use list. As a consequence, we
can't use the iterator-pair interface, we need an index based interface.
Expose such an interface from the AllocaPartitioning, and use it in the
speculator.

This should at least fix a use-after-free bug found by Duncan, and may
fix some of the other crashers.

I don't have a nice deterministic test case yet, but if I get a good
one, I'll add it.

llvm-svn: 165027
llvm/lib/Transforms/Scalar/SROA.cpp