[lld] [llvm] [Coverage][WebAssembly] Keep InstrProf segments during gc (PR #172023)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 12 17:56:40 PST 2025


================
@@ -229,6 +229,7 @@ enum WasmSegmentFlag : unsigned {
   WASM_SEG_FLAG_STRINGS = 0x1,
   WASM_SEG_FLAG_TLS = 0x2,
   WASM_SEG_FLAG_RETAIN = 0x4,
----------------
sbc100 wrote:

Sorry I don't understand what you mean by "WASM_SEG_FLAG_RETAIN will introduce other dead segments".  

Can you explain more.  It looks like `enqueueRetainedSegments` does exactly what we want to it to do so if we could pre-arrange for InstrProf segments to be marked as `WASM_SEG_FLAG_RETAIN` why wouldn't that just work?

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


More information about the llvm-commits mailing list