StructurizeCFG: Relax uniformity checks.
authorNeil Henning <neil.henning@amd.com>
Fri, 24 May 2019 08:59:17 +0000 (08:59 +0000)
committerNeil Henning <neil.henning@amd.com>
Fri, 24 May 2019 08:59:17 +0000 (08:59 +0000)
commit119c31ad9374210b5a950960a401582aac0c5333
tree7b4ca0329f12987f1ec31bf326adc1b14c6a1c29
parentd9bb7b69abe266ab8d3ba54186604af9cc8750ad
StructurizeCFG: Relax uniformity checks.

This change relaxes the checks for hasOnlyUniformBranches such that our
region is uniform if:

1. All conditional branches that are direct children are uniform.
2. And either:
  a. All sub-regions are uniform.
  b. There is one or less conditional branches among the direct
     children.

Differential Revision: https://reviews.llvm.org/D62198

llvm-svn: 361610
llvm/lib/Transforms/Scalar/StructurizeCFG.cpp
llvm/test/Transforms/StructurizeCFG/AMDGPU/uniform-regions.ll