From 70714705747f3491c55e14b74f87641010351d6c Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 7 Dec 2022 12:52:20 -0800 Subject: Remove `construct` IR op. (#2555) Co-authored-by: Yong He --- source/slang/slang-emit-cuda.cpp | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'source/slang/slang-emit-cuda.cpp') diff --git a/source/slang/slang-emit-cuda.cpp b/source/slang/slang-emit-cuda.cpp index cbeddcb13..24462594f 100644 --- a/source/slang/slang-emit-cuda.cpp +++ b/source/slang/slang-emit-cuda.cpp @@ -25,25 +25,6 @@ void CUDAExtensionTracker::finalize() } } -static bool _isSingleNameBasicType(IROp op) -{ - switch (op) - { - case kIROp_Int64Type: - case kIROp_UInt8Type: - case kIROp_UInt16Type: - case kIROp_UIntType: - case kIROp_UInt64Type: - case kIROp_IntPtrType: - case kIROp_UIntPtrType: - { - return false; - } - default: return true; - - } -} - UnownedStringSlice CUDASourceEmitter::getBuiltinTypeName(IROp op) { switch (op) @@ -547,7 +528,6 @@ void CUDASourceEmitter::_emitInitializerListValue(IRType* dstType, IRInst* value switch (value->getOp()) { - case kIROp_Construct: case kIROp_MakeMatrix: case kIROp_makeVector: { @@ -734,22 +714,6 @@ bool CUDASourceEmitter::tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo& inOu } break; } - case kIROp_Construct: - { - // Simple constructor call - // On CUDA some of the built in types can't be used as constructors directly - - IRType* type = inst->getDataType(); - if (auto basicType = as(type) && !_isSingleNameBasicType(type->getOp())) - { - m_writer->emit("("); - emitType(inst->getDataType()); - m_writer->emit(")"); - emitArgs(inst); - return true; - } - break; - } case kIROp_makeArray: { IRType* dataType = inst->getDataType(); -- cgit v1.2.3