diff options
Diffstat (limited to 'source/slang/slang-ir-deduplicate.cpp')
| -rw-r--r-- | source/slang/slang-ir-deduplicate.cpp | 14 |
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; |
