I built a post dominator tree for a function in my LLVM pass. However, the function has several blocks containing only unreachable instructions, which causes that the return block cannot post-dominate all basic blocks.
Therefore, what's the correct method to exclude such basic blocks in the post dominator tree? I've tried calling removeUnreachableBlocks()
but it changed nothing.