summaryrefslogtreecommitdiff
path: root/source/slang/ir-sccp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/ir-sccp.cpp')
-rw-r--r--source/slang/ir-sccp.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/source/slang/ir-sccp.cpp b/source/slang/ir-sccp.cpp
index 6c7f637c1..66b370848 100644
--- a/source/slang/ir-sccp.cpp
+++ b/source/slang/ir-sccp.cpp
@@ -633,7 +633,7 @@ struct SCCPContext
// may in turn add other blocks/instructions to
// the work lists.
//
- for( auto inst : block->getChildren() )
+ for( auto inst : block->getDecorationsAndChildren() )
{
updateValueForInst(inst);
}
@@ -702,7 +702,7 @@ struct SCCPContext
List<IRInst*> instsToRemove;
for( auto block : code->getBlocks() )
{
- for( auto inst : block->getChildren() )
+ for( auto inst : block->getDecorationsAndChildren() )
{
// We look for instructions that have a constnat value on
// the lattice.
@@ -869,7 +869,7 @@ struct SCCPContext
// err on the side of allowing unreachable code without
// a warning.
//
- block->removeAndDeallocateAllChildren();
+ block->removeAndDeallocateAllDecorationsAndChildren();
}
//
// At this point every one of our unreachable blocks is empty,
@@ -929,14 +929,10 @@ static void applySparseConditionalConstantPropagationRec(
}
}
- if( auto parentInst = as<IRParentInst>(inst) )
+ for( auto childInst : inst->getDecorationsAndChildren() )
{
- for( auto childInst : parentInst->getChildren() )
- {
- applySparseConditionalConstantPropagationRec(shared, childInst);
- }
+ applySparseConditionalConstantPropagationRec(shared, childInst);
}
-
}
void applySparseConditionalConstantPropagation(