Fix failing LLVM verification on unreachable blocks.
Bug: 8286478
The LLVM verifier fails if an unreachable block contains PHI instructions. This
happens in the Portable compiler when a catch block becomes unreachable.
This CL fixes the issue by ensuring catch blocks are always reachable. Under
some circumstances, they can be "virtually" reachable by creating fake
conditonal branch: "br i1 false, label %catch_block, label %next_insn". In
this case, we let LLVM delete these unreachable blocks.
Change-Id: I003c25492f32c0e7bbc8e32a48ec4ce47e2c8c32
1 file changed