]> granicus.if.org Git - llvm/commit
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)
commit5dde296faadecb53c5e2e535eb5360fd39a5e89b
tree41f3c3fec5c3a00885936c7d83dbd6b43b5f6d41
parent6a95aa40a9d5fd3cb68d02fb0324de56010f9cc5
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361610 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/StructurizeCFG.cpp
test/Transforms/StructurizeCFG/AMDGPU/uniform-regions.ll