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

Chuanqi Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 24 07:47:56 PDT 2022


ChuanqiXu marked an inline comment as done.
ChuanqiXu 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:
> 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`.
Oh, my bad. I should check that. Thanks for double checking!


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

https://reviews.llvm.org/D132352



More information about the cfe-commits mailing list