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-emit-c-like.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-emit-c-like.cpp')
| -rw-r--r-- | source/slang/slang-emit-c-like.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp index 0b5a91d87..718653545 100644 --- a/source/slang/slang-emit-c-like.cpp +++ b/source/slang/slang-emit-c-like.cpp @@ -36,7 +36,7 @@ namespace Slang { struct CLikeSourceEmitter::ComputeEmitActionsContext { IRInst* moduleInst; - HashSet<IRInst*> openInsts; + InstHashSet openInsts; Dictionary<IRInst*, EmitAction::Level> mapInstToLevel; List<EmitAction>* actions; }; @@ -3880,6 +3880,7 @@ void CLikeSourceEmitter::computeEmitActions(IRModule* module, List<EmitAction>& ComputeEmitActionsContext ctx; ctx.moduleInst = module->getModuleInst(); ctx.actions = &ioActions; + ctx.openInsts = InstHashSet(module); for(auto inst : module->getGlobalInsts()) { |
