[PATCH] D50433: A New Divergence Analysis for LLVM

Alexander via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 22 02:24:53 PDT 2018


alex-t added a comment.

Currently I cannot apply your diff to the trunk explicitly.
Could you tell me the commit or revision number in llvm trunk on which your patch could be applied?
if I could it'd be much more convenient to review.



================
Comment at: lib/Analysis/DivergenceAnalysis.cpp:168
+  // for (int i = 0; i < n; ++i) { // 'i' is uniform inside the loop
+  //   if (i*i % 7 == 0) break;    // divergent loop exit
+  // }
----------------
Why is this divergent? What is the source of divergence?
"i" does not depend on TID so all threads will exit when i = 7...
or earlier if n < 7 but again at the same point.


Repository:
  rL LLVM

https://reviews.llvm.org/D50433





More information about the llvm-commits mailing list