[llvm] Linker: Remove dropTriviallyDeadConstantArrays(). (PR #137081)

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 28 12:22:26 PDT 2025


pcc wrote:

> This seems like the wrong place to do this optimization anyway - is there no optimization pass that removes dead constant arrays, e.g. GlobalDCE?

GlobalDCE only deletes dead globals as far as I can tell. Although I suppose we could have passes (and other code like the IR linker) try to delete constants that have likely become unused (e.g. GlobalDCE can try to delete initializers of globals it creates), that should only be done if the benefits outweigh the costs, which is not the case here.

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


More information about the llvm-commits mailing list