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

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 11 17:22:26 PDT 2017


arsenm added inline comments.


================
Comment at: lib/Target/AMDGPU/SIFixSGPRCopies.cpp:331
 
+static bool predsHasTerminator(MachineBasicBlock *MBB,
+                               const TargetRegisterInfo *TRI) {
----------------
This is a bad name because most blocks have terminators. Almost all should at this point, this needs to specify that it is divergent terminator


================
Comment at: lib/Target/AMDGPU/SIFixSGPRCopies.cpp:333
+                               const TargetRegisterInfo *TRI) {
+  DenseSet<MachineBasicBlock*> Visited;
+  SmallVector<MachineBasicBlock*, 4> Worklist(MBB->pred_begin(), 
----------------
You could maybe make this a map and cache the result so that every single block that needs to be visited doesn't need to walk all the way up each time


Repository:
  rL LLVM

https://reviews.llvm.org/D31350





More information about the llvm-commits mailing list