@@ -274,7 +274,7 @@ void CLikeSourceEmitter::_emitUnsizedArrayType(IRUnsizedArrayType* arrayType, ED
274
274
275
275
void CLikeSourceEmitter::_emitType (IRType* type, EDeclarator* declarator)
276
276
{
277
- switch (type->op )
277
+ switch (type->getOp () )
278
278
{
279
279
default :
280
280
emitSimpleType (type);
@@ -774,7 +774,7 @@ void CLikeSourceEmitter::emitDeclarator(IRDeclaratorInfo* declarator)
774
774
775
775
void CLikeSourceEmitter::emitSimpleValueImpl (IRInst* inst)
776
776
{
777
- switch (inst->op )
777
+ switch (inst->getOp () )
778
778
{
779
779
case kIROp_IntLit :
780
780
{
@@ -880,7 +880,7 @@ void CLikeSourceEmitter::emitSimpleValueImpl(IRInst* inst)
880
880
bool CLikeSourceEmitter::shouldFoldInstIntoUseSites (IRInst* inst)
881
881
{
882
882
// Certain opcodes should never/always be folded in
883
- switch ( inst->op )
883
+ switch ( inst->getOp () )
884
884
{
885
885
default :
886
886
break ;
@@ -935,7 +935,7 @@ bool CLikeSourceEmitter::shouldFoldInstIntoUseSites(IRInst* inst)
935
935
if (as<IRAttr>(inst))
936
936
return true ;
937
937
938
- switch ( inst->op )
938
+ switch ( inst->getOp () )
939
939
{
940
940
default :
941
941
break ;
@@ -1078,7 +1078,7 @@ bool CLikeSourceEmitter::shouldFoldInstIntoUseSites(IRInst* inst)
1078
1078
// definition for certain types on certain targets (e.g. `out TriangleStream<T>`
1079
1079
// for GLSL), so we check this only after all those special cases are
1080
1080
// considered.
1081
- if (inst->op == kIROp_undefined )
1081
+ if (inst->getOp () == kIROp_undefined )
1082
1082
return false ;
1083
1083
1084
1084
// Okay, at this point we know our instruction must have a single use.
@@ -1186,7 +1186,7 @@ void CLikeSourceEmitter::emitDereferenceOperand(IRInst* inst, EmitOpInfo const&
1186
1186
// emit its name. i.e. *&var ==> var.
1187
1187
// We apply this peep hole optimization here to reduce the clutter of
1188
1188
// resulting code.
1189
- if (inst->op == kIROp_Var )
1189
+ if (inst->getOp () == kIROp_Var )
1190
1190
{
1191
1191
m_writer->emit (getName (inst));
1192
1192
return ;
@@ -1230,7 +1230,7 @@ void CLikeSourceEmitter::emitOperandImpl(IRInst* inst, EmitOpInfo const& outerP
1230
1230
return ;
1231
1231
}
1232
1232
1233
- switch (inst->op )
1233
+ switch (inst->getOp () )
1234
1234
{
1235
1235
case kIROp_Var :
1236
1236
case kIROp_GlobalVar :
@@ -1503,7 +1503,7 @@ void CLikeSourceEmitter::defaultEmitInstExpr(IRInst* inst, const EmitOpInfo& inO
1503
1503
{
1504
1504
EmitOpInfo outerPrec = inOuterPrec;
1505
1505
bool needClose = false ;
1506
- switch (inst->op )
1506
+ switch (inst->getOp () )
1507
1507
{
1508
1508
case kIROp_GlobalHashedStringLiterals :
1509
1509
/* Don't need to to output anything for this instruction - it's used for reflecting string literals that
@@ -1617,7 +1617,7 @@ void CLikeSourceEmitter::defaultEmitInstExpr(IRInst* inst, const EmitOpInfo& inO
1617
1617
case kIROp_Geq :
1618
1618
case kIROp_Leq :
1619
1619
{
1620
- const auto emitOp = getEmitOpForOp (inst->op );
1620
+ const auto emitOp = getEmitOpForOp (inst->getOp () );
1621
1621
1622
1622
auto prec = getInfo (emitOp);
1623
1623
needClose = maybeEmitParens (outerPrec, prec);
@@ -1645,7 +1645,7 @@ void CLikeSourceEmitter::defaultEmitInstExpr(IRInst* inst, const EmitOpInfo& inO
1645
1645
case kIROp_Or :
1646
1646
case kIROp_Mul :
1647
1647
{
1648
- const auto emitOp = getEmitOpForOp (inst->op );
1648
+ const auto emitOp = getEmitOpForOp (inst->getOp () );
1649
1649
const auto info = getInfo (emitOp);
1650
1650
1651
1651
needClose = maybeEmitParens (outerPrec, info);
@@ -1663,12 +1663,12 @@ void CLikeSourceEmitter::defaultEmitInstExpr(IRInst* inst, const EmitOpInfo& inO
1663
1663
{
1664
1664
IRInst* operand = inst->getOperand (0 );
1665
1665
1666
- const auto emitOp = getEmitOpForOp (inst->op );
1666
+ const auto emitOp = getEmitOpForOp (inst->getOp () );
1667
1667
const auto prec = getInfo (emitOp);
1668
1668
1669
1669
needClose = maybeEmitParens (outerPrec, prec);
1670
1670
1671
- switch (inst->op )
1671
+ switch (inst->getOp () )
1672
1672
{
1673
1673
case kIROp_BitNot :
1674
1674
{
@@ -1744,7 +1744,7 @@ void CLikeSourceEmitter::defaultEmitInstExpr(IRInst* inst, const EmitOpInfo& inO
1744
1744
}
1745
1745
else
1746
1746
{
1747
- if (inst->op == kIROp_getElementPtr && doesTargetSupportPtrTypes ())
1747
+ if (inst->getOp () == kIROp_getElementPtr && doesTargetSupportPtrTypes ())
1748
1748
{
1749
1749
const auto info = getInfo (EmitOp::Prefix);
1750
1750
needClose = maybeEmitParens (outerPrec, info);
@@ -1784,7 +1784,7 @@ void CLikeSourceEmitter::defaultEmitInstExpr(IRInst* inst, const EmitOpInfo& inO
1784
1784
for (Index ee = 0 ; ee < elementCount; ++ee)
1785
1785
{
1786
1786
IRInst* irElementIndex = ii->getElementIndex (ee);
1787
- SLANG_RELEASE_ASSERT (irElementIndex->op == kIROp_IntLit );
1787
+ SLANG_RELEASE_ASSERT (irElementIndex->getOp () == kIROp_IntLit );
1788
1788
IRConstant* irConst = (IRConstant*)irElementIndex;
1789
1789
1790
1790
UInt elementIndex = (UInt)irConst->value .intVal ;
@@ -1988,7 +1988,7 @@ void CLikeSourceEmitter::_emitInst(IRInst* inst)
1988
1988
1989
1989
m_writer->advanceToSourceLocation (inst->sourceLoc );
1990
1990
1991
- switch (inst->op )
1991
+ switch (inst->getOp () )
1992
1992
{
1993
1993
default :
1994
1994
emitInstResultDecl (inst);
@@ -2057,7 +2057,7 @@ void CLikeSourceEmitter::_emitInst(IRInst* inst)
2057
2057
for (UInt ee = 0 ; ee < elementCount; ++ee)
2058
2058
{
2059
2059
IRInst* irElementIndex = ii->getElementIndex (ee);
2060
- SLANG_RELEASE_ASSERT (irElementIndex->op == kIROp_IntLit );
2060
+ SLANG_RELEASE_ASSERT (irElementIndex->getOp () == kIROp_IntLit );
2061
2061
IRConstant* irConst = (IRConstant*)irElementIndex;
2062
2062
2063
2063
UInt elementIndex = (UInt)irConst->value .intVal ;
@@ -2088,7 +2088,7 @@ void CLikeSourceEmitter::_emitInst(IRInst* inst)
2088
2088
for (UInt ee = 0 ; ee < elementCount; ++ee)
2089
2089
{
2090
2090
IRInst* irElementIndex = ii->getElementIndex (ee);
2091
- SLANG_RELEASE_ASSERT (irElementIndex->op == kIROp_IntLit );
2091
+ SLANG_RELEASE_ASSERT (irElementIndex->getOp () == kIROp_IntLit );
2092
2092
IRConstant* irConst = (IRConstant*)irElementIndex;
2093
2093
2094
2094
UInt elementIndex = (UInt)irConst->value .intVal ;
@@ -2398,7 +2398,7 @@ void CLikeSourceEmitter::emitRegion(Region* inRegion)
2398
2398
// them into the current block.
2399
2399
//
2400
2400
m_writer->advanceToSourceLocation (terminator->sourceLoc );
2401
- switch (terminator->op )
2401
+ switch (terminator->getOp () )
2402
2402
{
2403
2403
default :
2404
2404
// Don't do anything with the terminator, and assume
@@ -3231,7 +3231,7 @@ void CLikeSourceEmitter::emitGlobalInstImpl(IRInst* inst)
3231
3231
{
3232
3232
m_writer->advanceToSourceLocation (inst->sourceLoc );
3233
3233
3234
- switch (inst->op )
3234
+ switch (inst->getOp () )
3235
3235
{
3236
3236
case kIROp_GlobalHashedStringLiterals :
3237
3237
/* Don't need to to output anything for this instruction - it's used for reflecting string literals that
@@ -3304,7 +3304,7 @@ void CLikeSourceEmitter::ensureInstOperandsRec(ComputeEmitActionsContext* ctx, I
3304
3304
3305
3305
UInt operandCount = inst->operandCount ;
3306
3306
auto requiredLevel = EmitAction::Definition;
3307
- if (inst->op == kIROp_InterfaceType )
3307
+ if (inst->getOp () == kIROp_InterfaceType )
3308
3308
requiredLevel = EmitAction::ForwardDeclaration;
3309
3309
3310
3310
for (UInt ii = 0 ; ii < operandCount; ++ii)
@@ -3330,7 +3330,7 @@ void CLikeSourceEmitter::ensureInstOperandsRec(ComputeEmitActionsContext* ctx, I
3330
3330
void CLikeSourceEmitter::ensureGlobalInst (ComputeEmitActionsContext* ctx, IRInst* inst, EmitAction::Level requiredLevel)
3331
3331
{
3332
3332
// Skip certain instructions that don't affect output.
3333
- switch (inst->op )
3333
+ switch (inst->getOp () )
3334
3334
{
3335
3335
case kIROp_Generic :
3336
3336
return ;
@@ -3373,7 +3373,7 @@ void CLikeSourceEmitter::ensureGlobalInst(ComputeEmitActionsContext* ctx, IRInst
3373
3373
ctx->mapInstToLevel [inst] = requiredLevel;
3374
3374
3375
3375
// Skip instructions that don't correspond to an independent entity in output.
3376
- switch (inst->op )
3376
+ switch (inst->getOp () )
3377
3377
{
3378
3378
case kIROp_InterfaceRequirementEntry :
3379
3379
return ;
0 commit comments