diff options
| author | Yong He <yonghe@outlook.com> | 2023-07-12 19:55:41 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-12 19:55:41 -0700 |
| commit | f3aba255f6d69ddbf255b33d0eb0f391908e60a8 (patch) | |
| tree | f43300b1bbbcc82caa1b547dd3922c608010cb98 /source/slang/slang-ir-simplify-for-emit.cpp | |
| parent | 98ba936ed91328338ba95525dd658d5cde6582de (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-simplify-for-emit.cpp')
| -rw-r--r-- | source/slang/slang-ir-simplify-for-emit.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/slang/slang-ir-simplify-for-emit.cpp b/source/slang/slang-ir-simplify-for-emit.cpp index f040ef1ec..469368ca4 100644 --- a/source/slang/slang-ir-simplify-for-emit.cpp +++ b/source/slang/slang-ir-simplify-for-emit.cpp @@ -11,12 +11,12 @@ bool isCUDATarget(TargetRequest* targetReq); struct SimplifyForEmitContext : public InstPassBase { SimplifyForEmitContext(IRModule* inModule, TargetRequest* inTargetReq) - : InstPassBase(inModule), targetReq(inTargetReq) + : InstPassBase(inModule), targetReq(inTargetReq), followUpWorkList(inModule), followUpWorkListSet(inModule) {} TargetRequest* targetReq; - List<IRInst*> followUpWorkList; - HashSet<IRInst*> followUpWorkListSet; + InstWorkList followUpWorkList; + InstHashSet followUpWorkListSet; void addToFollowUpWorkList(IRInst* inst) { |
