[PATCH] D150636: [LLVM][Uniformity] Simplify handling of new divergent values

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 15 23:48:55 PDT 2023


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

LGTM with or without nits addressed.



================
Comment at: llvm/include/llvm/ADT/GenericUniformityImpl.h:358-359
 
   /// \brief Mark \p DivVal as a value that is always divergent.
   /// \returns Whether the tracked divergence state of \p DivVal changed.
+  void markDivergent(const InstructionT &I);
----------------
Maybe it's time to comment each function separately? The one you've changed no longer returns anything.


================
Comment at: llvm/include/llvm/ADT/GenericUniformityImpl.h:786-788
+  } else if (isAlwaysUniform(I)) {
+    return;
+  } else {
----------------
`else` after `return` looks odd and it seems easy to avoid it here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150636



More information about the llvm-commits mailing list