summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir-ssa-register-allocate.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-ssa-register-allocate.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-ssa-register-allocate.cpp')
-rw-r--r--source/slang/slang-ir-ssa-register-allocate.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/slang/slang-ir-ssa-register-allocate.cpp b/source/slang/slang-ir-ssa-register-allocate.cpp
index b1d375fcf..a93a3a8f4 100644
--- a/source/slang/slang-ir-ssa-register-allocate.cpp
+++ b/source/slang/slang-ir-ssa-register-allocate.cpp
@@ -156,8 +156,8 @@ struct RegisterAllocateContext
// This order allows us to easily track what is dominating the current inst.
// We track the insts dominating the current location in a stack.
- List<IRInst*> dominatingInsts;
- HashSet<IRInst*> dominatingInstSet;
+ InstWorkList dominatingInsts(func->getModule());
+ InstHashSet dominatingInstSet(func->getModule());
struct WorkStackItem
{