[JumpThreading] Don't forget to report that the IR changed
authorDavid Majnemer <david.majnemer@gmail.com>
Sun, 10 Jan 2016 07:13:04 +0000 (07:13 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Sun, 10 Jan 2016 07:13:04 +0000 (07:13 +0000)
commit0b06a2d608f0ba5f1e6fda2b48b640ca65dc53e4
treee29b60141896a5990bb3a5244a591c190f406a08
parent83fa9b85da9b94a331bc2abd545b410e516ac6e5
[JumpThreading] Don't forget to report that the IR changed

JumpThreading's runOnFunction is supposed to return true if it made any
changes.  JumpThreading has a call to removeUnreachableBlocks which may
result in changes to the IR but runOnFunction didn't appropriate account
for this possibility, leading to badness.

While we are here, make sure to call LazyValueInfo::eraseBlock in
removeUnreachableBlocks;  JumpThreading preserves LVI.

This fixes PR26096.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257279 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/Local.h
lib/Transforms/Scalar/JumpThreading.cpp
lib/Transforms/Utils/Local.cpp