[PATCH] D46672: COFF: ICF a section and its associated pdata section as a unit.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 10 11:36:34 PDT 2018


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

Looks good to me, but let @ruiu review for more style feedback.

It might be worth pointing out somewhere in comments that it's the **xdata** section that might differ, and the pdata section will refer to the xdata, which makes it appear different during ICF.

We're convinced .pdata is special, right? What about other applications of comdat associative metadata, like ASan global metadata? ASan typically doesn't register metadata for readonly globals, but if it did register different metadata for two readonly globals with the same contents that got folded by ICF, would that be correct?

The other main application of associative comdats is debug info. If we ICF two functions together, we probably want to toss the debug info for the function we choose to discard, otherwise the debugger might get confused. This needs testing and experimentation, but it something to think about, since this is another instance of metadata using labels to refer to offsets in ICF'ed code.


https://reviews.llvm.org/D46672





More information about the llvm-commits mailing list