summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-ir-specialize.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-07-12 19:55:41 -0700
committerGitHub <noreply@github.com>2023-07-12 19:55:41 -0700
commitf3aba255f6d69ddbf255b33d0eb0f391908e60a8 (patch)
treef43300b1bbbcc82caa1b547dd3922c608010cb98 /source/slang/slang-ir-specialize.cpp
parent98ba936ed91328338ba95525dd658d5cde6582de (diff)
Pool inst worklists and hashsets to avoid rehashing. (#2982)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir-specialize.cpp')
-rw-r--r--source/slang/slang-ir-specialize.cpp4
1 files changed, 2 insertions, 2 deletions
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<IRInst*> localWorkList;
- HashSet<IRInst*> processedInsts;
+ InstWorkList localWorkList(inst->getModule());
+ InstHashSet processedInsts(inst->getModule());
localWorkList.add(inst);
processedInsts.add(inst);