4 Commits

Author SHA1 Message Date
Kyungwoo Lee
0dd9fdcf83
[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.
2024-10-26 20:02:05 -07:00
Sergei Barannikov
4a98f52281
[StructuralHashPrinter] Always print 16-digit hash (#101655)
The hash may contain less than 14 significant digits, which caused the
test to fail.
2024-08-02 16:45:22 +03:00
Aiden Grossman
d944cab731 [IR] Make detailed structural hash test look at diffs
This patch makes structural-hash-detailed.ll look at diffs rather than
specific values to make the test more robust against the underlying
hashing implementation while still testing that the hash value is
deterministic across multiple runs.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D159154
2023-08-30 10:31:58 -07:00
Aiden Grossman
3a42b1fd3e [IR] Add SturcturalHash printer pass
This patch adds in a StructuralHash printer pass that prints out the
hexadeicmal representation of the hash of a module and all of the
functions within it.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D158317
2023-08-29 18:59:52 -07:00