[PATCH] D149646: [LLVM][Uniformity] Propagate temporal divergence explicitly

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 15 02:24:12 PDT 2023


foad accepted this revision.
foad added a comment.
This revision is now accepted and ready to land.

Looks fine to me, thanks!



================
Comment at: llvm/include/llvm/ADT/GenericUniformityImpl.h:817-819
+// - Check all PHIs in all exit blocks for inputs defined in the cycle.
+// - For every block B inside C that dominates at least one exit block, check
+//   all uses outside C.
----------------
Conceptually you could unify these two cases by looking for blocks B that dominate an exit //edge//; but I have no idea whether DomTree has good support for querying dominance on CFG edges.


================
Comment at: llvm/include/llvm/ADT/GenericUniformityImpl.h:839
+  auto dominatesAnExit = [&](BlockT *BB) {
+    for (auto *Exit : Exits) {
+      if (DT.dominates(BB, Exit))
----------------
Might be cleaner to use `any_of`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149646/new/

https://reviews.llvm.org/D149646



More information about the llvm-commits mailing list