[PATCH] D102436: [lld][WebAssembly] Enable string merging for debug sections

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 18 11:43:02 PDT 2021


sbc100 added inline comments.


================
Comment at: lld/wasm/InputFiles.cpp:368
+  // have to go on the name alone.
+  return sec.Name.startswith(".debug_str");
+}
----------------
dschuff wrote:
> this doesn't include `.debug_line_str`.
> 
> Also, I guess the current situation is that we are creating the sections with the flags on the LLVM side, but we don't currently have a way to encode custom section flags?
Yes, sadly that is the current situation.   I hope to improve that by adding flag that can apply to custom sections as well as data segments.


================
Comment at: lld/wasm/OutputSections.cpp:251
+    // A section should not make it here unless its alive
+    // assert(ms->live);
+
----------------
dschuff wrote:
> does this not apply to generic chunks the same way?
For now at least it looks like we don't need.  Removed.


================
Comment at: lld/wasm/OutputSections.cpp:256
+          make<SyntheticMergedChunk>(name, 0, WASM_SEG_FLAG_STRINGS);
+      // syn->outputSec = this;
+      newSections.push_back(mergedSection);
----------------
dschuff wrote:
> is this needed?
I turns out for custom sections this is not currently needed.  Removed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102436



More information about the llvm-commits mailing list