[llvm] [LLD] Avoid non-deterministic relocations processing. (PR #107186)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 17 21:48:36 PDT 2024


MaskRay wrote:

> Shall we revert [reviews.llvm.org/D148728](https://reviews.llvm.org/D148728) but possibly keep the `spawn` helper to allow ` tg.spawn([]{fn();}, condition)`? lld is the only `spawn` caller that may specify the `Sequential` parameter.
> 
> The downside is that we need `threadIndex==0` for the main thread in the sequential case. We cannot keep the `threadIndex != UINT_MAX` assertion. I feel that the value of the assertion is low.
> 
> If needed, the assertion can be restored using a different mechanism:
> 
> * initialize `threadIndex` to UINT_MAX
> * make the sequential mode temporarily set `threadIndex` to 0, run the task, restore `threadIndex`

I think we should essentially revert https://reviews.llvm.org/D148728 . Created #109084

https://github.com/llvm/llvm-project/pull/107186


More information about the llvm-commits mailing list