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-specialize.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/slang/slang-ir-specialize.cpp') diff --git a/source/slang/slang-ir-specialize.cpp b/source/slang/slang-ir-specialize.cpp index 3fc3b153d..26f54a271 100644 --- a/source/slang/slang-ir-specialize.cpp +++ b/source/slang/slang-ir-specialize.cpp @@ -1339,8 +1339,8 @@ struct SpecializationContext // TODO: We probably need/want a more robust test here. // For now we are just look into the dependency graph of the inst and // see if there are any opcodes that are causing problems. - List localWorkList; - HashSet processedInsts; + InstWorkList localWorkList(inst->getModule()); + InstHashSet processedInsts(inst->getModule()); localWorkList.add(inst); processedInsts.add(inst); -- cgit v1.2.3