[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-25 Thread Aiden Grossman via llvm-branch-commits
https://github.com/boomanaiden154 approved this pull request. https://github.com/llvm/llvm-project/pull/112638 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-25 Thread Ellis Hoag via llvm-branch-commits
@@ -13,15 +13,18 @@ namespace llvm { +enum class StructuralHashOptions { None, Detailed, CallTargetIgnored }; ellishg wrote: Can you document these options and include their string values, e.g., `call-target-ignored`? https://github.com/llvm/llvm-project/p

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-25 Thread Ellis Hoag via llvm-branch-commits
https://github.com/ellishg approved this pull request. Overall LGTM! https://github.com/llvm/llvm-project/pull/112638 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-co

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-25 Thread Ellis Hoag via llvm-branch-commits
https://github.com/ellishg edited https://github.com/llvm/llvm-project/pull/112638 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-25 Thread Ellis Hoag via llvm-branch-commits
@@ -22,3 +26,13 @@ define i32 @f2(i32 %a) { ; DETAILED-HASH-NEXT: Function f1 Hash: [[DF1H:([a-f0-9]{16,})]] ; DETAILED-HASH-NOT: [[DF1H]] ; DETAILED-HASH-NEXT: Function f2 Hash: {{([a-f0-9]{16,})}} + +; When ignoring the call target, check if `f1` and `f2` produce the same fu

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-25 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi approved this pull request. LGTM from my perspective. Do check w/ @ellishg before landing, though. And thanks for working on this :) https://github.com/llvm/llvm-project/pull/112638 ___ llvm-branch-commits mailing list llvm-

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-21 Thread Kyungwoo Lee via llvm-branch-commits
https://github.com/kyulee-com updated https://github.com/llvm/llvm-project/pull/112638 >From 6225d74229d41068c57109a24b063f6fcba13985 Mon Sep 17 00:00:00 2001 From: Kyungwoo Lee Date: Wed, 16 Oct 2024 17:09:07 -0700 Subject: [PATCH 1/4] [StructuralHash] Support Differences This comutes a struc

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-21 Thread Ellis Hoag via llvm-branch-commits
@@ -1168,9 +1168,19 @@ Expected parseMemProfUsePassOptions(StringRef Params) { return Result; } -Expected parseStructuralHashPrinterPassOptions(StringRef Params) { - return PassBuilder::parseSinglePassOption(Params, "detailed", -

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-19 Thread Aiden Grossman via llvm-branch-commits
boomanaiden154 wrote: > IIRC we have several lit tests that cover structural hash, shouldn't we have > a new test there that uses the new functionality? The lit tests for structural hashing are pretty limited and mostly designed to just test the structural hash printer pass that I needed for o

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-19 Thread Kyungwoo Lee via llvm-branch-commits
kyulee-com wrote: The test failure `TableGen/x86-fold-tables.td` seems unrelated. https://github.com/llvm/llvm-project/pull/112638 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/l

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-19 Thread Kyungwoo Lee via llvm-branch-commits
@@ -100,8 +233,20 @@ class StructuralHashImpl { if (const auto *ComparisonInstruction = dyn_cast(&Inst)) Hashes.emplace_back(ComparisonInstruction->getPredicate()); -for (const auto &Op : Inst.operands()) - Hashes.emplace_back(hashOperand(Op)); +unsigned

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-19 Thread Kyungwoo Lee via llvm-branch-commits
@@ -47,24 +60,140 @@ class StructuralHashImpl { public: StructuralHashImpl() = delete; - explicit StructuralHashImpl(bool DetailedHash) : DetailedHash(DetailedHash) {} + explicit StructuralHashImpl(bool DetailedHash, + IgnoreOperandFunc Ignore

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-19 Thread Kyungwoo Lee via llvm-branch-commits
kyulee-com wrote: > IIRC we have several lit tests that cover structural hash, shouldn't we have > a new test there that uses the new functionality? Extended the existing `StructuralHashPrinterPass` with `Options`, and updated the corresponding lit test accordingly. https://github.com/llvm/ll

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-19 Thread Kyungwoo Lee via llvm-branch-commits
@@ -47,24 +60,140 @@ class StructuralHashImpl { public: StructuralHashImpl() = delete; - explicit StructuralHashImpl(bool DetailedHash) : DetailedHash(DetailedHash) {} + explicit StructuralHashImpl(bool DetailedHash, + IgnoreOperandFunc Ignore

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-19 Thread Kyungwoo Lee via llvm-branch-commits
@@ -47,24 +60,140 @@ class StructuralHashImpl { public: StructuralHashImpl() = delete; - explicit StructuralHashImpl(bool DetailedHash) : DetailedHash(DetailedHash) {} + explicit StructuralHashImpl(bool DetailedHash, + IgnoreOperandFunc Ignore

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-19 Thread Kyungwoo Lee via llvm-branch-commits
@@ -47,24 +60,140 @@ class StructuralHashImpl { public: StructuralHashImpl() = delete; - explicit StructuralHashImpl(bool DetailedHash) : DetailedHash(DetailedHash) {} + explicit StructuralHashImpl(bool DetailedHash, + IgnoreOperandFunc Ignore

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-19 Thread Kyungwoo Lee via llvm-branch-commits
@@ -47,24 +60,140 @@ class StructuralHashImpl { public: StructuralHashImpl() = delete; - explicit StructuralHashImpl(bool DetailedHash) : DetailedHash(DetailedHash) {} + explicit StructuralHashImpl(bool DetailedHash, + IgnoreOperandFunc Ignore

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-19 Thread Kyungwoo Lee via llvm-branch-commits
https://github.com/kyulee-com updated https://github.com/llvm/llvm-project/pull/112638 >From 6225d74229d41068c57109a24b063f6fcba13985 Mon Sep 17 00:00:00 2001 From: Kyungwoo Lee Date: Wed, 16 Oct 2024 17:09:07 -0700 Subject: [PATCH 1/3] [StructuralHash] Support Differences This comutes a struc

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-18 Thread Paul Kirth via llvm-branch-commits
@@ -47,24 +60,140 @@ class StructuralHashImpl { public: StructuralHashImpl() = delete; - explicit StructuralHashImpl(bool DetailedHash) : DetailedHash(DetailedHash) {} + explicit StructuralHashImpl(bool DetailedHash, + IgnoreOperandFunc Ignore

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-18 Thread Paul Kirth via llvm-branch-commits
@@ -47,24 +60,140 @@ class StructuralHashImpl { public: StructuralHashImpl() = delete; - explicit StructuralHashImpl(bool DetailedHash) : DetailedHash(DetailedHash) {} + explicit StructuralHashImpl(bool DetailedHash, + IgnoreOperandFunc Ignore

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-18 Thread Paul Kirth via llvm-branch-commits
@@ -47,24 +60,140 @@ class StructuralHashImpl { public: StructuralHashImpl() = delete; - explicit StructuralHashImpl(bool DetailedHash) : DetailedHash(DetailedHash) {} + explicit StructuralHashImpl(bool DetailedHash, + IgnoreOperandFunc Ignore

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-18 Thread Paul Kirth via llvm-branch-commits
@@ -184,6 +329,12 @@ class StructuralHashImpl { } uint64_t getHash() const { return Hash; } + std::unique_ptr getIndexInstrMap() { +return std::move(IndexInstruction); + } + std::unique_ptr getIndexPairOpndHashMap() { ilovepi wrote: ```suggestion

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-18 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/112638 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-18 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi commented: IIRC we have several lit tests that cover structural hash, shouldn't we have a new test there that uses the new functionality? https://github.com/llvm/llvm-project/pull/112638 ___ llvm-branch-commits mailing list

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-18 Thread Ellis Hoag via llvm-branch-commits
@@ -47,24 +60,140 @@ class StructuralHashImpl { public: StructuralHashImpl() = delete; - explicit StructuralHashImpl(bool DetailedHash) : DetailedHash(DetailedHash) {} + explicit StructuralHashImpl(bool DetailedHash, + IgnoreOperandFunc Ignore

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-18 Thread Kyungwoo Lee via llvm-branch-commits
https://github.com/kyulee-com edited https://github.com/llvm/llvm-project/pull/112638 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-18 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Kyungwoo Lee (kyulee-com) Changes 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 whi

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-18 Thread Kyungwoo Lee via llvm-branch-commits
https://github.com/kyulee-com ready_for_review https://github.com/llvm/llvm-project/pull/112638 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-17 Thread Kyungwoo Lee via llvm-branch-commits
https://github.com/kyulee-com edited https://github.com/llvm/llvm-project/pull/112638 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-17 Thread Kyungwoo Lee via llvm-branch-commits
https://github.com/kyulee-com edited https://github.com/llvm/llvm-project/pull/112638 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)

2024-10-16 Thread Kyungwoo Lee via llvm-branch-commits
https://github.com/kyulee-com created https://github.com/llvm/llvm-project/pull/112638 This comutes 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 inc