diff options
| author | Yong He <yonghe@outlook.com> | 2022-12-07 12:52:20 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-07 12:52:20 -0800 |
| commit | 70714705747f3491c55e14b74f87641010351d6c (patch) | |
| tree | 8b0e3905892da915b731521dbd3dc0c86482b406 /source/slang/slang-emit-cuda.cpp | |
| parent | 3a3a8b5f7701109fc413f42692c4de5769870489 (diff) | |
Remove `construct` IR op. (#2555)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-emit-cuda.cpp')
| -rw-r--r-- | source/slang/slang-emit-cuda.cpp | 36 |
1 files changed, 0 insertions, 36 deletions
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<IRBasicType>(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(); |
