Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6 |
|
#
4f41862c |
| 04-Dec-2024 |
Kyungwoo Lee <kyulee@meta.com> |
Reapply "[StructuralHash] Global Variable (#118412)"
This reverts commit 6a0d6fc2e92bcfb7cb01a4c6cdd751a9b4b4c159.
|
#
6a0d6fc2 |
| 04-Dec-2024 |
Kyungwoo Lee <kyulee@meta.com> |
Revert "[StructuralHash] Global Variable (#118412)"
This reverts commit 1afb81dfaf902c1c42bd91fec1a7385e6e1529d3.
|
#
1afb81df |
| 04-Dec-2024 |
Kyungwoo Lee <kyulee@meta.com> |
[StructuralHash] Global Variable (#118412)
This update enhances the implementation of structural hashing for global
variables, using their initial contents. Private global variables or
constants a
[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%.
show more ...
|
Revision tags: llvmorg-19.1.5, llvmorg-19.1.4 |
|
#
6f10b652 |
| 02-Nov-2024 |
Kazu Hirata <kazu@google.com> |
[IR] Remove unused includes (NFC) (#114679)
Identified with misc-include-cleaner.
|
Revision tags: llvmorg-19.1.3 |
|
#
0dd9fdcf |
| 27-Oct-2024 |
Kyungwoo Lee <kyulee@meta.com> |
[StructuralHash] Support Differences (#112638)
This computes a structural hash while allowing for selective ignoring of
certain operands based on a custom function that is provided. Instead of
a s
[StructuralHash] Support Differences (#112638)
This computes a structural hash while allowing for selective ignoring of
certain operands based on a custom function that is provided. Instead of
a single hash value, it now returns FunctionHashInfo which includes a
hash value, an instruction mapping, and a map to track the operand
location and its corresponding hash value that is ignored.
Depends on https://github.com/llvm/llvm-project/pull/112621.
This is a patch for
https://discourse.llvm.org/t/rfc-global-function-merging/82608.
show more ...
|
#
1941c518 |
| 26-Oct-2024 |
Kyungwoo Lee <kyulee@meta.com> |
Reland (2nd attempt) [StructuralHash] Refactor (#112621)
This is largely NFC, and it prepares for #112638. - Use stable_hash instead of uint64_t - Rename update* to hash* functions. They compute s
Reland (2nd attempt) [StructuralHash] Refactor (#112621)
This is largely NFC, and it prepares for #112638. - Use stable_hash instead of uint64_t - Rename update* to hash* functions. They compute stable_hash locally and return it.
This is a patch for https://discourse.llvm.org/t/rfc-global-function-merging/82608.
show more ...
|
#
d104b8e8 |
| 26-Oct-2024 |
Kyungwoo Lee <kyulee@meta.com> |
Revert "Reland [StructuralHash] Refactor (#112621)"
This reverts commit 98ca9a635bd2fb98cee473a9558687a5b522e219.
|
#
98ca9a63 |
| 26-Oct-2024 |
Kyungwoo Lee <kyulee@meta.com> |
Reland [StructuralHash] Refactor (#112621)
This is largely NFC, and it prepares for #112638. - Use stable_hash instead of uint64_t - Rename update* to hash* functions. They compute stable_hash loc
Reland [StructuralHash] Refactor (#112621)
This is largely NFC, and it prepares for #112638. - Use stable_hash instead of uint64_t - Rename update* to hash* functions. They compute stable_hash locally and return it.
This is a patch for https://discourse.llvm.org/t/rfc-global-function-merging/82608.
show more ...
|
#
96723756 |
| 26-Oct-2024 |
Kyungwoo Lee <kyulee@meta.com> |
Revert "[StructuralHash] Refactor (#112621)"
This reverts commit b667d161f0a9ff6b29cda0ccdb0081610c1e8b8c.
|
#
b667d161 |
| 26-Oct-2024 |
Kyungwoo Lee <kyulee@meta.com> |
[StructuralHash] Refactor (#112621)
This is largely NFC, and it prepares for #112638.
- Use stable_hash instead of uint64_t
- Rename update* to hash* functions. They compute stable_hash locally a
[StructuralHash] Refactor (#112621)
This is largely NFC, and it prepares for #112638.
- Use stable_hash instead of uint64_t
- Rename update* to hash* functions. They compute stable_hash locally and return it.
This is a patch for
https://discourse.llvm.org/t/rfc-global-function-merging/82608.
show more ...
|
Revision tags: llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4 |
|
#
d252365a |
| 24-Aug-2024 |
Kazu Hirata <kazu@google.com> |
[IR] Modernize StructuralHashImpl (NFC) (#105951)
|
Revision tags: llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init |
|
#
fd358997 |
| 14-Jan-2024 |
Kazu Hirata <kazu@google.com> |
[IR] Use range-based for loops (NFC)
|
Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4 |
|
#
09f4c696 |
| 30-Aug-2023 |
Aiden Grossman <agrossman154@yahoo.com> |
[NFC][IR] Update StructuralHash comment
This patch updates a comment at the top of the structural hash implementation that was made invalid by 64da0be1fc06ee2199bd27c980736986e0eccd9d. The class is
[NFC][IR] Update StructuralHash comment
This patch updates a comment at the top of the structural hash implementation that was made invalid by 64da0be1fc06ee2199bd27c980736986e0eccd9d. The class is now used for more than just validating pass return status and is now the sole implementation rather than being copied from somewhere.
show more ...
|
Revision tags: llvmorg-17.0.0-rc3 |
|
#
f532d61d |
| 18-Aug-2023 |
Aiden Grossman <agrossman154@yahoo.com> |
[IR] Add more details to StructuralHash
This pass extends StructuralHash to include much more information about the IR under analysis. This is done with a flag (Detailed) to configure the behavior.
[IR] Add more details to StructuralHash
This pass extends StructuralHash to include much more information about the IR under analysis. This is done with a flag (Detailed) to configure the behavior. The detailed behavior is intended for use in expensive checks and downstream.
Differential Revision: https://reviews.llvm.org/D158250
Reviewed-By: aeubanks, nikic
show more ...
|
#
64da0be1 |
| 17-Aug-2023 |
Aiden Grossman <agrossman154@yahoo.com> |
Reland "[NFCi][MergeFunctions] Consolidate Hashing Functions"
This is a reland of 28134a29fdedd8972acdfb39223571ddcc15dc59 which was reverted due to behavioral differences between 32 and 64 bit buil
Reland "[NFCi][MergeFunctions] Consolidate Hashing Functions"
This is a reland of 28134a29fdedd8972acdfb39223571ddcc15dc59 which was reverted due to behavioral differences between 32 and 64 bit builds that have since been fixed.
Differential Revision: https://reviews.llvm.org/D158217
show more ...
|
#
7ff7df1c |
| 19-Aug-2023 |
Aiden Grossman <agrossman154@yahoo.com> |
Revert "[NFCi][MergeFunctions] Consolidate Hashing Functions"
This reverts commit 28134a29fdedd8972acdfb39223571ddcc15dc59.
This patch was causing build failures on multiple buildbots on 32-bit arc
Revert "[NFCi][MergeFunctions] Consolidate Hashing Functions"
This reverts commit 28134a29fdedd8972acdfb39223571ddcc15dc59.
This patch was causing build failures on multiple buildbots on 32-bit architectures. Reverting now so I can deboug out-of-trunk and resubmit later.
show more ...
|
#
28134a29 |
| 17-Aug-2023 |
Aiden Grossman <agrossman154@yahoo.com> |
[NFCi][MergeFunctions] Consolidate Hashing Functions
A couple years ago, StructuralHash was created, copying the exact hashing implementation from FunctionComparator (minus a couple small details/re
[NFCi][MergeFunctions] Consolidate Hashing Functions
A couple years ago, StructuralHash was created, copying the exact hashing implementation from FunctionComparator (minus a couple small details/refactorings). Since then, the hashing implementation has not diverged, but several other areas, like unit testing, have diverged significantly, with StructuralHash getting more attention in these areas. This patch aims to consolidate the two hashing functions into StructuralHash given they do the exact same thing and having less divergence in areas like unit testing would be beneficial.
The original aim at creating a separate StructuralHash was to make the implementation divergent and capture additional details like instruction operands (which neither hashing implementation does currently). The MergeFunctions pass doesn't need these detaisl, but verification of pass return values would benefit from this additional data. Setting an option to calculate these values would allow for divergent behavior where appropriate while reducing code duplication with little runtime overhead.
Reviewed By: aeubanks
Differential Revision: https://reviews.llvm.org/D158217
show more ...
|
Revision tags: llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init |
|
#
e8e499f5 |
| 28-Jun-2023 |
Paul Kirth <paulkirth@google.com> |
[IR] Ignore globals with the `llvm.` prefix when calculating module hash
This came up in This came up in https://reviews.llvm.org/D146776#inline-1489091 and is slightly related to https://reviews.ll
[IR] Ignore globals with the `llvm.` prefix when calculating module hash
This came up in This came up in https://reviews.llvm.org/D146776#inline-1489091 and is slightly related to https://reviews.llvm.org/D153855. In both patches, there is the observation that some modifications of the module should not invalidate analysis, such as when adding a declaration or some metadata the won't be used when compiling the current module.
This patch implements the suggestion that we should ignore globals that have the `llvm.` prefix when calculating the module hash.
Fixes https://github.com/llvm/llvm-project/issues/63590
Reviewed By: aeubanks
Differential Revision: https://reviews.llvm.org/D154019
show more ...
|
#
d2640f59 |
| 29-Jun-2023 |
Mikael Holmen <mikael.holmen@ericsson.com> |
[StructuralHash] Ignore global variable declarations
Ignore declarations of global variables, just as we do with declarations of functions.
Done as a follow up to the comments in https://reviews.ll
[StructuralHash] Ignore global variable declarations
Ignore declarations of global variables, just as we do with declarations of functions.
Done as a follow up to the comments in https://reviews.llvm.org/D149209
Differential Revision: https://reviews.llvm.org/D153855
# Conflicts: # llvm/lib/IR/StructuralHash.cpp
show more ...
|
#
75a17970 |
| 28-Jun-2023 |
Paul Kirth <paulkirth@google.com> |
Reland [llvm] Preliminary fat-lto-objects support
Fat LTO objects contain both LTO compatible IR, as well as generated object code. This allows users to defer the choice of whether to use LTO or not
Reland [llvm] Preliminary fat-lto-objects support
Fat LTO objects contain both LTO compatible IR, as well as generated object code. This allows users to defer the choice of whether to use LTO or not to link-time. This is a feature available in GCC for some time, and makes the existing -ffat-lto-objects flag functional in the same way as GCC's.
Within LLVM, we add a new EmbedBitcodePass that serializes the module to the object file, and expose a new pass pipeline for compiling fat objects. The new pipeline initially clones the module and runs the selected (Thin)LTOPrelink pipeline, after which it will serialize the module into a `.llvm.lto` section of an ELF file. When compiling for (Thin)LTO, this normally the point at which the compiler would emit a object file containing the bitcode and metadata.
After that point we compile the original module using the PerModuleDefaultPipeline used for non-LTO compilation. We generate standard object files at the end of this pipeline, which contain machine code and the new `.llvm.lto` section containing bitcode.
Since the two pipelines operate on different copies of the module, we can be sure that the bitcode in the `.llvm.lto` section and object code in `.text` are congruent with the existing output produced by the default and LTO pipelines.
Original RFC: https://discourse.llvm.org/t/rfc-ffat-lto-objects-support/63977
Earlier versions of this patch were missing REQUIRES lines for llc related tests in Transforms/EmbedBitcode. Those tests are now under CodeGen/X86, which should avoid running the check on unsupported platforms.
The EmbedbBitcodePass also returned PreservedAnalyses::all when adding a metadata section, which failed expensive checks, since it modified the module. This is now corrected.
Reviewed By: tejohnson, MaskRay, nikic
Differential Revision: https://reviews.llvm.org/D146776
show more ...
|
Revision tags: llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4 |
|
#
ce90dfc7 |
| 15-May-2023 |
Arthur Eubanks <aeubanks@google.com> |
[StructuralHash] Track global variables
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D149209
|
Revision tags: llvmorg-16.0.3 |
|
#
891ce5bd |
| 25-Apr-2023 |
Arthur Eubanks <aeubanks@google.com> |
[NFC][StructuralHash] Use hash_code
|
Revision tags: llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0 |
|
#
20a7ea49 |
| 14-Mar-2023 |
Arthur Eubanks <aeubanks@google.com> |
[StandardInstrumentations] Verify function doesn't change if analyses are preserved
Reuse StructuralHash and allow it to be used in non-expensive checks builds.
Move PreservedAnalysisChecker furthe
[StandardInstrumentations] Verify function doesn't change if analyses are preserved
Reuse StructuralHash and allow it to be used in non-expensive checks builds.
Move PreservedAnalysisChecker further down StandardInstrumentations so other Instrumentations (e.g. printing) have a chance to run before PreservedAnalysisChecker crashes.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D146003
show more ...
|
#
b5776f10 |
| 14-Mar-2023 |
Arthur Eubanks <aeubanks@google.com> |
[StructuralHash][NFC] Use anonymous namespace
|
Revision tags: llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
#
59b02923 |
| 06-Jan-2023 |
Guillaume Chatelet <gchatelet@google.com> |
[reland][NFC] Vastly simplifies TypeSize
Simplifies the implementation of `TypeSize` while retaining its interface. There is no need for abstract concepts like `LinearPolyBase`, `UnivariateLinearPol
[reland][NFC] Vastly simplifies TypeSize
Simplifies the implementation of `TypeSize` while retaining its interface. There is no need for abstract concepts like `LinearPolyBase`, `UnivariateLinearPolyBase` or `LinearPolySize`.
Differential Revision: https://reviews.llvm.org/D140263
show more ...
|