File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1743,7 +1743,7 @@ void addHoistableInst(IRBuilder* builder, IRInst* inst)
1743
1743
}
1744
1744
1745
1745
// Add the given inst to the parent of its operand.
1746
- void addInst (IRInst* inst)
1746
+ void addDeduplicatedInst (IRInst* inst)
1747
1747
{
1748
1748
SLANG_ASSERT (nullptr == inst->parent );
1749
1749
@@ -2648,7 +2648,7 @@ IRInst* IRBuilder::_findOrEmitHoistableInst(
2648
2648
// In order to de-duplicate them, Witness-table is marked as Hoistable.
2649
2649
// But it is not exactly a hoistable type and it can be added simpler.
2650
2650
if (inst->getOp () == kIROp_WitnessTable )
2651
- addInst (inst);
2651
+ addDeduplicatedInst (inst);
2652
2652
else
2653
2653
addHoistableInst (this , inst);
2654
2654
}
@@ -4628,7 +4628,10 @@ void addGlobalValue(IRBuilder* builder, IRInst* value)
4628
4628
// have dependency to the earlier siblings.
4629
4629
//
4630
4630
if (value->parent )
4631
+ {
4632
+ SLANG_ASSERT (getIROpInfo (value->getOp ()).isHoistable ());
4631
4633
return ;
4634
+ }
4632
4635
4633
4636
// Try to find a suitable parent for the
4634
4637
// global value we are emitting.
You can’t perform that action at this time.
0 commit comments