[PATCH] D16602: StructurizeCFG: Add an option for skipping regions with only uniform branches

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 8 18:51:36 PST 2016


tstellarAMD added a comment.

In http://reviews.llvm.org/D16602#340002, @arsenm wrote:

> Do we need to worry about updating the DivergenceAnalysis as the control flow is changed in the non-uniform regions? Sometimes it introduces new xor instructions which won't be in DA's value map.


I don't think this would be a problem, because we don't use the DivergenceAnalysis any more, once we have started to structurize a region.


================
Comment at: lib/Transforms/Scalar/StructurizeCFG.cpp:264
@@ -252,1 +263,3 @@
   void getAnalysisUsage(AnalysisUsage &AU) const override {
+    if (SkipUniformRegions)
+      AU.addRequired<DivergenceAnalysis>();
----------------
Explicitly adding DivergenceAnalysis in TargetPassConfig doesn't seem to work, so I've made DivergenceAnalysis required only when SkipUniformRegions is true.


http://reviews.llvm.org/D16602





More information about the llvm-commits mailing list