Ignore unreachable blocks when doing memory dependence analysis on non-local
authorBill Wendling <isanbard@gmail.com>
Tue, 23 Oct 2012 18:37:11 +0000 (18:37 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 23 Oct 2012 18:37:11 +0000 (18:37 +0000)
commitb846719663fb7f7847dacf956696ef257ab88d8e
tree30a2ef186a192fc5b9f64b0d23ed8df81f895b24
parent5a719fcb5ea91ec4e7af6fc2e48ec31774a859dd
Ignore unreachable blocks when doing memory dependence analysis on non-local
loads. It's not really profitable and may result in GVN going into an infinite
loop when it hits constructs like this:

     %x = gep %some.type %x, ...

Found via an LTO build of LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166490 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/MemoryDependenceAnalysis.cpp
test/Transforms/GVN/crash.ll