From f3aba255f6d69ddbf255b33d0eb0f391908e60a8 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 12 Jul 2023 19:55:41 -0700 Subject: Pool inst worklists and hashsets to avoid rehashing. (#2982) Co-authored-by: Yong He --- source/slang/slang-ir-redundancy-removal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/slang/slang-ir-redundancy-removal.cpp') diff --git a/source/slang/slang-ir-redundancy-removal.cpp b/source/slang/slang-ir-redundancy-removal.cpp index 227ef1d4d..bac39a53c 100644 --- a/source/slang/slang-ir-redundancy-removal.cpp +++ b/source/slang/slang-ir-redundancy-removal.cpp @@ -254,7 +254,7 @@ bool tryRemoveRedundantStore(IRGlobalValueWithCode* func, IRStore* store) { bool hasNonStoreUse = false; // If the entire access chain doesn't non-store use, we can safely remove it. - HashSet knownAccessChain; + InstHashSet knownAccessChain(func->getModule()); for (auto accessChain = store->getPtr(); accessChain;) { knownAccessChain.add(accessChain); -- cgit v1.2.3