[PATCH] D132352: Introduce noread_thread_id to address the thread identification problem in coroutines

John McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 23 09:25:33 PDT 2022


rjmccall added inline comments.


================
Comment at: llvm/include/llvm/IR/InstrTypes.h:1863
+  /// not access or only reads memory.
+  bool doesNotReadThreadIDNorLivesInPresplitCoroutine() const {
+    return doesNoReadThreadID() || !getFunction() ||
----------------
rjmccall wrote:
> This is an odd use of "nor".  Maybe take a different approach — `canReadDifferentThreadIDIfMoved()`?
Oh, I didn't notice this last night — `canReadDifferentThreadIDIfMoved` has the opposite sense of the old method, so either you need to negate the logic in the method and all its call sites, or you need to rename it something like `cannotReadDifferentThreadIDIfMoved`.


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

https://reviews.llvm.org/D132352



More information about the llvm-commits mailing list