[clang] [lld] [llvm] [WebAssembly] Cooperative threading for WASIP3 (PR #200855)
Sy Brand via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 8 01:59:15 PDT 2026
================
@@ -1057,7 +1057,15 @@ static StringRef getOutputDataSegmentName(const InputChunk &seg) {
OutputSegment *Writer::createOutputSegment(StringRef name) {
LLVM_DEBUG(dbgs() << "new segment: " << name << "\n");
OutputSegment *s = make<OutputSegment>(name);
- if (ctx.arg.sharedMemory)
+ // In the shared memory case, all data segments must be passive since they
+ // will be initialized once by the main thread and then shared with other
+ // threads. In the non-shared memory case, we use passive segments only for
+ // TLS segments, so that they can be reused, and for .bss segments, which
+ // don't need to be included in the binary at all.
----------------
TartanLlama wrote:
I've updated the comment
https://github.com/llvm/llvm-project/pull/200855
More information about the llvm-commits
mailing list