[PATCH] D59343: [WebAssembly] Use passive segments when memory is shared
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 15 14:02:01 PDT 2019
sbc100 added inline comments.
================
Comment at: lld/test/wasm/data-segment-merging.ll:61
+; MERGE-SHARED: - Type: DATA
+; MERGE-SHARED: Segments:
+; MERGE-SHARED: InitFlags: 1
----------------
Can we switch to MERGE-SHARED-NEXT here and below?
================
Comment at: lld/wasm/OutputSections.cpp:164
+ Segments.size() <= 1 &&
+ "Currenly only a single data segment is supported in PIC mode");
+
----------------
Perhaps we should make this into a fatal error? And we could perhaps catch it earlier. Doesn't need to happen in this CL though I guess,
================
Comment at: lld/wasm/Writer.cpp:1350
+ // initialize passive data segments
+ for (const OutputSegment *S : Segments) {
+ if (S->InitFlags & WASM_SEGMENT_IS_PASSIVE) {
----------------
I'm tempted to make this a new function of its own that is than called as constructor 0. What do you think?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59343/new/
https://reviews.llvm.org/D59343
More information about the llvm-commits
mailing list