[PATCH] D21674: [BranchFolding] Update UnavoidableBlocks for OutlineOptionalBranches
Haicheng Wu via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 24 10:54:39 PDT 2016
haicheng added a comment.
In http://reviews.llvm.org/D21674#466591, @iteratee wrote:
> I'm also looking at this, and it doesn't even correctly update the list of unavoidable blocks. Consider merging 2 identical blocks, neither of which is unavoidable, but the merged block is. There are other examples, but that's probably the simplest one to describe in a comment.
Tail merging merges predecessors so that it is possible that an avoidable blocks can be promoted to be unavoidable, but I don't think an unavoidable block can become avoidable.
It does not make things worse if the block can be promoted remains in the avoidable area. Tail merging always make things better although maybe not best. I think you tail duplication patch can at least live with this patch and move on. If you want precise update, I can do it for you in the next patch.
More information about the llvm-commits