diff options
author | Kyungwoo Lee <kyulee@meta.com> | 2024-10-26 09:55:21 -0700 |
---|---|---|
committer | Kyungwoo Lee <kyulee@meta.com> | 2024-10-26 09:55:21 -0700 |
commit | 96723756231e316e68b0dacb104862eecbee01a2 (patch) | |
tree | 08e0136e0695ec9f0bcd32f9542a76e9128a3d9a /llvm/lib/Transforms/IPO/MergeFunctions.cpp | |
parent | b667d161f0a9ff6b29cda0ccdb0081610c1e8b8c (diff) | |
download | llvm-96723756231e316e68b0dacb104862eecbee01a2.zip llvm-96723756231e316e68b0dacb104862eecbee01a2.tar.gz llvm-96723756231e316e68b0dacb104862eecbee01a2.tar.bz2 |
Revert "[StructuralHash] Refactor (#112621)"
This reverts commit b667d161f0a9ff6b29cda0ccdb0081610c1e8b8c.
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}); |