Apply non-trivial unswitch to the branches that do not diverge after analysis.
@bcahoon This revision is based on your previous implementation (https://reviews.llvm.org/D109762). In the parent revision(https://reviews.llvm.org/D127547) we use FuncPass to re-implement non-trivial LoopUnswitch, thus, we do not invoke DivergenceAnalysis for each loop. Would you please have are look for whether these modifications (implement non-trivial LoopUnswitch with FuncPass and integrate DivergenceAnalysis in the new FuncPass) work on your test cases? Thanks