diff options
author | Kyungwoo Lee <kyulee@meta.com> | 2024-10-26 13:55:46 -0700 |
---|---|---|
committer | Kyungwoo Lee <kyulee@meta.com> | 2024-10-26 13:55:46 -0700 |
commit | d104b8e827ef5c3cb723aee92af4adfc8af18e9a (patch) | |
tree | 6e39d41dd892c19608f31c0b25cdda18ae3945b0 /llvm/lib/Transforms/IPO/MergeFunctions.cpp | |
parent | 64d7e45c40e75846d13f4f7a853f9a3ea3493faa (diff) | |
download | llvm-d104b8e827ef5c3cb723aee92af4adfc8af18e9a.zip llvm-d104b8e827ef5c3cb723aee92af4adfc8af18e9a.tar.gz llvm-d104b8e827ef5c3cb723aee92af4adfc8af18e9a.tar.bz2 |
Revert "Reland [StructuralHash] Refactor (#112621)"
This reverts commit 98ca9a635bd2fb98cee473a9558687a5b522e219.
Diffstat (limited to 'llvm/lib/Transforms/IPO/MergeFunctions.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/MergeFunctions.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/MergeFunctions.cpp b/llvm/lib/Transforms/IPO/MergeFunctions.cpp index ad16b0b..b50a700 100644 --- a/llvm/lib/Transforms/IPO/MergeFunctions.cpp +++ b/llvm/lib/Transforms/IPO/MergeFunctions.cpp @@ -172,14 +172,14 @@ namespace { class FunctionNode { mutable AssertingVH<Function> F; - stable_hash Hash; + IRHash Hash; public: // Note the hash is recalculated potentially multiple times, but it is cheap. FunctionNode(Function *F) : F(F), Hash(StructuralHash(*F)) {} Function *getFunc() const { return F; } - stable_hash getHash() const { return Hash; } + IRHash getHash() const { return Hash; } /// Replace the reference to the function F by the function G, assuming their /// implementations are equal. @@ -420,7 +420,7 @@ bool MergeFunctions::runOnModule(Module &M) { // All functions in the module, ordered by hash. Functions with a unique // hash value are easily eliminated. - std::vector<std::pair<stable_hash, Function *>> HashedFuncs; + std::vector<std::pair<IRHash, Function *>> HashedFuncs; for (Function &Func : M) { if (isEligibleForMerging(Func)) { HashedFuncs.push_back({StructuralHash(Func), &Func}); |