{"push_id":704916950,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"2df417ba6780c20687e2bcd0ec5d4e507b828422","before":"9eb9c09ebda71aca0beabc5371375b1a23caed45","commits":[{"sha":"2df417ba6780c20687e2bcd0ec5d4e507b828422","author":{"email":"7f3b563762cedf85ff9ce23cb18b85fca5cd6be1@google.com","name":"Rui Ueyama"},"message":"COFF: Initial implementation of Identical COMDAT Folding.\n\nIdentical COMDAT Folding (ICF) is an optimization to reduce binary\nsize by merging COMDAT sections that contain the same metadata,\nactual data and relocations. MSVC link.exe and many other linkers\nhave this feature. LLD achieves on per with MSVC in terms produced\nbinary size with this patch.\n\nThis technique is pretty effective. For example, LLD's size is\nreduced from 64MB to 54MB by enaling this optimization.\n\nThe algorithm implemented in this patch is extremely inefficient.\nIt puts all COMDAT sections into a set to identify duplicates.\nTime to self-link with/without ICF are 3.3 and 320 seconds,\nrespectively. So this option roughly makes LLD 100x slower.\nBut it's okay as I wanted to achieve correctness first.\nLLD is still able to link itself with this optimization.\nI'm going to make it more efficient in followup patches.\n\nNote that this optimization is *not* entirely safe. C/C++ require\ndifferent functions have different addresses. If your program\nrelies on that property, your program wouldn't work with ICF.\nHowever, it's not going to be an issue on Windows because MSVC\nlink.exe turns ICF on by default. As long as your program works\nwith default settings (or not passing /opt:noicf), your program\nwould work with LLD too.","distinct":true,"url":"https://api.github.com/repos/llvm-project/llvm-project-submodule/commits/2df417ba6780c20687e2bcd0ec5d4e507b828422"}]}