[lld] [LLD] Implement --enable-non-contiguous-regions (PR #90007)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 10:28:24 PDT 2024


================
@@ -226,6 +226,8 @@ void OutputSection::finalizeInputSections() {
         i = std::prev(mergeSections.end());
         syn->entsize = ms->entsize;
         isd->sections.push_back(syn);
+        if (script)
----------------
smithp35 wrote:

I think it may be worth a comment here. Something like:
// As syn is inserted in place of the first merge section
// inherit its potential spill locations.

I did think that we could make copySpillList into moveSpillList as I don't think `ms` is used again, but it is more expensive than just the copy. 



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


More information about the llvm-commits mailing list