[all-commits] [llvm/llvm-project] 1afb81: [StructuralHash] Global Variable (#118412)
Kyungwoo Lee via All-commits
all-commits at lists.llvm.org
Tue Dec 3 16:02:12 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1afb81dfaf902c1c42bd91fec1a7385e6e1529d3
https://github.com/llvm/llvm-project/commit/1afb81dfaf902c1c42bd91fec1a7385e6e1529d3
Author: Kyungwoo Lee <kyulee at meta.com>
Date: 2024-12-03 (Tue, 03 Dec 2024)
Changed paths:
M llvm/include/llvm/IR/StructuralHash.h
M llvm/lib/CodeGen/MachineStableHash.cpp
M llvm/lib/IR/StructuralHash.cpp
A llvm/test/CodeGen/AArch64/cgdata-merge-gvar-nsconst.ll
A llvm/test/CodeGen/AArch64/cgdata-merge-gvar-objc.ll
A llvm/test/CodeGen/AArch64/cgdata-merge-gvar-string.ll
A llvm/test/CodeGen/AArch64/cgdata-outline-gvar.ll
Log Message:
-----------
[StructuralHash] Global Variable (#118412)
This update enhances the implementation of structural hashing for global
variables, using their initial contents. Private global variables or
constants are often used for metadata, where their names are not unique.
This can lead to the creation of different hash results although they
could be merged by the linker as they are effectively identical.
- Refine the hashing of GlobalVariables for strings or certain
Objective-C metadata cases that have section names. This can be further
extended to other scenarios.
- Expose StructuralHash for GlobalVariable so that this API can be
utilized by MachineStableHashing, which is also employed in the global
function outliner.
This change significantly improves size reduction by an additional 1% on
the LLD binary when the global function outliner and merger are enabled
together. As discussed in the RFC
https://discourse.llvm.org/t/loh-conflicting-with-machineoutliner/83279/8?u=kyulee-com,
if we disable or relocate the LOH pass, the size impact could increase
to 4%.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list