[PATCH] D50433: A New Divergence Analysis for LLVM

Diogo N. Sampaio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 8 06:48:59 PDT 2018


dnsampaio added inline comments.


================
Comment at: lib/Analysis/SyncDependenceAnalysis.cpp:85-95
+//            entry
+//          /      \
+//         A        \
+//       /   \       Y
+// x0 = 0   x1 = 1  /
+//       \   /   \ /
+//      x2=phi    E
----------------
NIC: As to be more precise, you could put a origin value x in block  Y or before, and a phi=(x1, x) in block E.

I was wondering, if using some value numbering (GVN alike) or scev, if one could detect cases where x0 and x1 would hold the same value/expression. In such case, x2 would not be divergent isn't it? Perhaps is not something very common, although it happened in some old NVIDIA Cuda-sdk examples.


Repository:
  rL LLVM

https://reviews.llvm.org/D50433





More information about the llvm-commits mailing list