Refactor AnalyzeBranch on ARM. The previous version did not always analyze
authorLang Hames <lhames@gmail.com>
Fri, 19 Jul 2013 23:52:47 +0000 (23:52 +0000)
committerLang Hames <lhames@gmail.com>
Fri, 19 Jul 2013 23:52:47 +0000 (23:52 +0000)
commit24864fe1503991d5bcb9645939310c8a4e1e24df
tree2f4b14fc9103783c9af91e46c7976008a09a2c3f
parented64342b67de1bbbd9e2421a64442d8eb5825bd8
Refactor AnalyzeBranch on ARM. The previous version did not always analyze
indirect branches correctly. Under some circumstances, this led to the deletion
of basic blocks that were the destination of indirect branches. In that case it
left indirect branches to nowhere in the code.

This patch replaces, and is more general than either of the previous fixes for
indirect-branch-analysis issues, r181161 and r186461.

For other branches (not indirect) this refactor should have *almost* identical
behavior to the previous version. There are some corner cases where this
refactor is able to analyze blocks that the previous version could not (e.g.
this necessitated the update to thumb2-ifcvt2.ll).

<rdar://problem/14464830>

llvm-svn: 186735
llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
llvm/test/CodeGen/ARM/indirectbr-3.ll [new file with mode: 0644]
llvm/test/CodeGen/Thumb2/thumb2-ifcvt2.ll