Teach SimplifyCFG how to simplify indirectbr instructions.
 - Eliminate redundant successors.
 - Convert an indirectbr with one successor into a direct branch.

Also, generalize SimplifyCFG to be able to be run on a function entry block.
It knows quite a few simplifications which are applicable to the entry
block, and it only needs a few checks to avoid trouble with the entry block.

llvm-svn: 111060
6 files changed
tree: e6591471e46231800e73582000d2b83f65c0e505
  1. clang/
  2. compiler-rt/
  3. libcxx/
  4. lldb/
  5. llvm/