[PATCH] D46756: [AMDGPU] Reworked SIFixWWMLiveness

Tim Renouf via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 23 07:36:36 PDT 2018


tpr added inline comments.


================
Comment at: lib/Target/AMDGPU/SIFixWWMLiveness.cpp:238
+    auto DomDefBlock = Defs[0]->getParent();
+    if (DomDefBlock->succ_size() == 2 && MRI->hasOneUse(Reg)) {
+      auto UseBlock = MRI->use_begin(Reg)->getParent()->getParent();
----------------
arsenm wrote:
> Without looking at this too closely, I would like to avoid adding assumptions where the number of successors of a block is exactly 2 to avoid future pain when control flow lowering is changed. Is there a more specific property you can check instead?
It is checking for a very specific case. Currently I believe the structurizer will always generate if..then..endif as the only way of having a non-uniform phi in non-loop cases. This seems the best way to do it for now, although the whole thing is a hack that would possibly need core LLVM support to fix properly.


Repository:
  rL LLVM

https://reviews.llvm.org/D46756





More information about the llvm-commits mailing list