diff options
| author | Yong He <yonghe@outlook.com> | 2022-12-07 13:42:48 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-07 13:42:48 -0800 |
| commit | 53e891eb28ceac5f956399c65f2ae27d37f3d724 (patch) | |
| tree | 4094efab488289f7e5ea7ad4dde9d45525ff03be /source/slang/slang-emit-c-like.cpp | |
| parent | 70714705747f3491c55e14b74f87641010351d6c (diff) | |
Rename IR opcodes to unify style. (#2556)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-emit-c-like.cpp')
| -rw-r--r-- | source/slang/slang-emit-c-like.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp index 662c89f3b..cadab5690 100644 --- a/source/slang/slang-emit-c-like.cpp +++ b/source/slang/slang-emit-c-like.cpp @@ -1107,9 +1107,9 @@ bool CLikeSourceEmitter::shouldFoldInstIntoUseSites(IRInst* inst) // in pointers directly. // case kIROp_FieldAddress: - case kIROp_getElementPtr: + case kIROp_GetElementPtr: case kIROp_Specialize: - case kIROp_lookup_interface_method: + case kIROp_LookupWitness: case kIROp_GetValueFromBoundInterface: return true; } @@ -1132,8 +1132,8 @@ bool CLikeSourceEmitter::shouldFoldInstIntoUseSites(IRInst* inst) // them to initializer lists, which aren't allowed in // general expression contexts. // - case kIROp_makeStruct: - case kIROp_makeArray: + case kIROp_MakeStruct: + case kIROp_MakeArray: case kIROp_swizzleSet: return false; @@ -1697,7 +1697,7 @@ void CLikeSourceEmitter::emitCallExpr(IRCall* inst, EmitOpInfo outerPrec) handleRequiredCapabilities(funcValue); // Detect if this is a call into a COM interface method. - if (funcValue->getOp() == kIROp_lookup_interface_method) + if (funcValue->getOp() == kIROp_LookupWitness) { auto operand0Type = funcValue->getOperand(0)->getDataType(); switch (operand0Type->getOp()) @@ -1776,7 +1776,7 @@ void CLikeSourceEmitter::defaultEmitInstExpr(IRInst* inst, const EmitOpInfo& inO emitSimpleValue(inst); break; - case kIROp_makeVector: + case kIROp_MakeVector: case kIROp_MakeMatrix: case kIROp_MakeMatrixFromScalar: case kIROp_MatrixReshape: @@ -1794,7 +1794,7 @@ void CLikeSourceEmitter::defaultEmitInstExpr(IRInst* inst, const EmitOpInfo& inO m_writer->emit(getName(inst->getDataType())); m_writer->emit("()"); break; - case kIROp_makeUInt64: + case kIROp_MakeUInt64: m_writer->emit("(("); emitType(inst->getDataType()); m_writer->emit("("); @@ -1803,7 +1803,7 @@ void CLikeSourceEmitter::defaultEmitInstExpr(IRInst* inst, const EmitOpInfo& inO emitOperand(inst->getOperand(0), getInfo(EmitOp::General)); m_writer->emit(")"); break; - case kIROp_constructVectorFromScalar: + case kIROp_MakeVectorFromScalar: case kIROp_CastPtrToInt: case kIROp_CastIntToPtr: { @@ -2006,7 +2006,7 @@ void CLikeSourceEmitter::defaultEmitInstExpr(IRInst* inst, const EmitOpInfo& inO m_writer->emit("->getBuffer()"); break; } - case kIROp_makeString: + case kIROp_MakeString: { m_writer->emit("String("); emitOperand(inst->getOperand(0), EmitOpInfo()); @@ -2047,8 +2047,8 @@ void CLikeSourceEmitter::defaultEmitInstExpr(IRInst* inst, const EmitOpInfo& inO m_writer->emit(".detach()"); break; } - case kIROp_getElement: - case kIROp_getElementPtr: + case kIROp_GetElement: + case kIROp_GetElementPtr: case kIROp_ImageSubscript: // HACK: deal with translation of GLSL geometry shader input arrays. if(auto decoration = inst->getOperand(0)->findDecoration<IRGLSLOuterArrayDecoration>()) @@ -2065,7 +2065,7 @@ void CLikeSourceEmitter::defaultEmitInstExpr(IRInst* inst, const EmitOpInfo& inO } else { - if (inst->getOp() == kIROp_getElementPtr && doesTargetSupportPtrTypes()) + if (inst->getOp() == kIROp_GetElementPtr && doesTargetSupportPtrTypes()) { const auto info = getInfo(EmitOp::Prefix); needClose = maybeEmitParens(outerPrec, info); @@ -2155,8 +2155,8 @@ void CLikeSourceEmitter::defaultEmitInstExpr(IRInst* inst, const EmitOpInfo& inO m_writer->emit(getName(inst)); break; - case kIROp_makeArray: - case kIROp_makeStruct: + case kIROp_MakeArray: + case kIROp_MakeStruct: { // TODO: initializer-list syntax may not always // be appropriate, depending on the context @@ -3484,7 +3484,7 @@ void CLikeSourceEmitter::ensureInstOperandsRec(ComputeEmitActionsContext* ctx, I case kIROp_NativePtrType: requiredLevel = EmitAction::ForwardDeclaration; break; - case kIROp_lookup_interface_method: + case kIROp_LookupWitness: case kIROp_FieldExtract: case kIROp_FieldAddress: { |
