If we have a block (B1) with an otherwise-unthreadable branch on a compare, and its predecessors are terminated by an unconditional jump, try cloning it to a predecessor (B2) if B1 has a successor B3 which is terminated by a branch whose condition is known in B2. The cloning would result in an edge B2->B3 which could be potentially threaded with the branch that terminates B3.
Part of this patch deals with renaming and refactoring DuplicateCondBranchOnPHIIntoPred and ProcessBranchOnPHI so that they can be reused to clone in this case.
I see that the other functions in this file do not follow the convention:
now that you are changing the name of this function, please make it start with lower-case.