summaryrefslogtreecommitdiff
path: root/source/slang/slang-ir-deduplicate.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-02-16 16:44:04 -0800
committerGitHub <noreply@github.com>2023-02-16 16:44:04 -0800
commit245466d89cfe54b78da486f06d470bc6daaf4625 (patch)
tree522e0af1a9d2756182e143cdc85031ea1bbc2aa0 /source/slang/slang-ir-deduplicate.cpp
parent4c4826d47eeef4675daae4ae53ff76f4d5ebd84a (diff)
Remove `SharedIRBuilder`. (#2657)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-ir-deduplicate.cpp')
-rw-r--r--source/slang/slang-ir-deduplicate.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/slang/slang-ir-deduplicate.cpp b/source/slang/slang-ir-deduplicate.cpp
index 74efc3cb3..168451479 100644
--- a/source/slang/slang-ir-deduplicate.cpp
+++ b/source/slang/slang-ir-deduplicate.cpp
@@ -2,16 +2,16 @@
namespace Slang
{
- void SharedIRBuilder::deduplicateAndRebuildGlobalNumberingMap()
+ void IRDeduplicationContext::init(IRModule* module)
{
- }
+ m_module = module;
+ m_session = module->getSession();
- void SharedIRBuilder::replaceGlobalInst(IRInst* oldInst, IRInst* newInst)
- {
- oldInst->replaceUsesWith(newInst);
+ m_globalValueNumberingMap.Clear();
+ m_constantMap.Clear();
}
- void SharedIRBuilder::removeHoistableInstFromGlobalNumberingMap(IRInst* instToRemove)
+ void IRDeduplicationContext::removeHoistableInstFromGlobalNumberingMap(IRInst* instToRemove)
{
HashSet<IRInst*> userWorkListSet;
List<IRInst*> userWorkList;
@@ -39,7 +39,7 @@ namespace Slang
IRBuilder* builder,
IRInst* inst);
- void SharedIRBuilder::tryHoistInst(IRInst* inst)
+ void IRDeduplicationContext::tryHoistInst(IRInst* inst)
{
List<IRInst*> workList;
HashSet<IRInst*> workListSet;