[PATCH] D30363: COFF ICF: Merge only functions. Do not merge read-only data.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 27 12:48:12 PST 2017


pcc added a comment.

In https://reviews.llvm.org/D30363#687625, @inglorion wrote:

> This causes us to eliminate less duplication, right? Is folding of identical non-functions something we may want to re-enable at a later point? Should we make the behavior controllable by a flag - or perhaps only implement the MSVC-compatible behavior when using msvclto?


I think we will want to do something very similar to what Rafael proposed for https://reviews.llvm.org/D30365, i.e. we would want to extend the COFF format with an address-taken flag. I think it can be done in a way that would not interfere with any extensions that Microsoft might make to the format.

As a side note, I think this would also be useful for emitting smaller bitmaps for Control Flow Guard, as we would only need to add address-taken functions to the bitmap.


https://reviews.llvm.org/D30363





More information about the llvm-commits mailing list