[PATCH] D36585: [AMDGPU] Eliminate no effect instructions before s_endpgm

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 14 12:04:08 PDT 2017


rampitec added inline comments.


================
Comment at: lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp:114
   LiveIntervals *LIS = &getAnalysis<LiveIntervals>();
+  DenseSet<unsigned> RecalcRegs({AMDGPU::EXEC_LO, AMDGPU::EXEC_HI});
   bool Changed = false;
----------------
arsenm wrote:
> SmallSet?
SmallSet does not provide a way to iterate over members in the set.


================
Comment at: lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp:166
+          if (Pred->succ_size() == 1)
+            Blocks.push_back(Pred);
+      }
----------------
arsenm wrote:
> It's seems overly aggressive to be trying to prune other blocks here. Should these types of instructions be sunk or blocks merged earlier?
It does not mean they can be sunk. Two predecessors may have different tailing instructions, but all can be dead given the path to s_endpgm. Also some instructions are eliminated from preceding blocks by the very same pass which would then allow to merge blocks, but only after this pass finished.


https://reviews.llvm.org/D36585





More information about the llvm-commits mailing list