[PATCH] D31350: AMDGPU : Fix common dominator of two incoming blocks terminates with uniform branch issue.

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 30 18:22:07 PDT 2017


rampitec added a comment.

In https://reviews.llvm.org/D31350#714741, @wdng wrote:

> Completely remove weak if condition for checking whether two blocks with a uniform branch, current implementation uses divergence analysis to detect whether two blocks with a uniform branch. If all conditions on all paths leading to a block are uniform, block is uniform.


I do not see divergence analysis used. I see that you are checking for PHI to be a constant, which is way stronger than just uniform.



================
Comment at: lib/Target/AMDGPU/SIFixSGPRCopies.cpp:393
+                                                        N->getIDom()->getBlock();
+          if (IPostDom != NULL) {
+            for (auto I = IPostDom->getBasicBlock()->begin(); isa<PHINode>(I); ++I) {
----------------
Please use nullptr instead of NULL.


Repository:
  rL LLVM

https://reviews.llvm.org/D31350





More information about the llvm-commits mailing list