[PATCH] D142317: [Support][LLD] Avoid using uninitialized threadIndex.
Andrew Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 23 04:30:47 PST 2023
andrewng added inline comments.
================
Comment at: llvm/lib/Support/Parallel.cpp:231-232
}
for (; Begin != End; ++Begin)
Fn(Begin);
return;
----------------
Perhaps a "simpler" fix would be not to use the main thread here, i.e. should use `TG.spawn`? However, that assumes that `getThreadIndex()` is only for use in the "`parallelFor`" style functions otherwise the other parallel functions would also need to avoid using the main thread too.
I'm surprised that this hasn't been causing more issues.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142317/new/
https://reviews.llvm.org/D142317
More information about the llvm-commits
mailing list