[PATCH] D148916: [Support][Parallel] Initialize threadIndex and add assertion checking its usage.

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 26 09:26:02 PDT 2023


avl added inline comments.


================
Comment at: llvm/lib/Support/Parallel.cpp:251-252
 
   for (; Begin != End; ++Begin)
     Fn(Begin);
 }
----------------
andrewng wrote:
> IIUC, this will be executed if `parallel::strategy.ThreadsRequested == 1` and in this case, `getThreadIndex()` will return `UINT_MAX`. Is this the intended behaviour?
no, that is not intended. Good catch! Thank you.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148916



More information about the llvm-commits mailing list