Skip to content

Commit daad382

Browse files
authored
Initial support NonSemantic.Kernel.DebugInfo.100 (#1846)
This patch implements the initial support for the new debug specification NonSemantic.Kernel.DebugInfo.100. It also introduces support for the new debug instruction DISubrange. Spec: KhronosGroup/SPIRV-Registry#186
1 parent 4af277c commit daad382

16 files changed

+340
-8
lines changed

include/LLVMSPIRVOpts.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ enum class BIsRepresentation : uint32_t { OpenCL12, OpenCL20, SPIRVFriendlyIR };
8080

8181
enum class FPContractMode : uint32_t { On, Off, Fast };
8282

83-
enum class DebugInfoEIS : uint32_t { SPIRV_Debug, OpenCL_DebugInfo_100 };
83+
enum class DebugInfoEIS : uint32_t {
84+
SPIRV_Debug,
85+
OpenCL_DebugInfo_100,
86+
NonSemantic_Kernel_DebugInfo_100
87+
};
8488

8589
/// \brief Helper class to manage SPIR-V translation
8690
class TranslatorOpts {

lib/SPIRV/LLVMToSPIRVDbgTran.cpp

+88
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,12 @@ SPIRVEntry *LLVMToSPIRVDbgTran::transDbgEntryImpl(const MDNode *MDN) {
277277
case dwarf::DW_TAG_array_type:
278278
return transDbgArrayType(cast<DICompositeType>(DIEntry));
279279

280+
case dwarf::DW_TAG_subrange_type:
281+
if (BM->getDebugInfoEIS() == SPIRVEIS_NonSemantic_Kernel_DebugInfo_100)
282+
return transDbgSubrangeType(cast<DISubrange>(DIEntry));
283+
else
284+
return getDebugInfoNone();
285+
280286
case dwarf::DW_TAG_const_type:
281287
case dwarf::DW_TAG_restrict_type:
282288
case dwarf::DW_TAG_volatile_type:
@@ -552,6 +558,14 @@ SPIRVEntry *LLVMToSPIRVDbgTran::transDbgQualifiedType(const DIDerivedType *QT) {
552558
}
553559

554560
SPIRVEntry *LLVMToSPIRVDbgTran::transDbgArrayType(const DICompositeType *AT) {
561+
if (BM->getDebugInfoEIS() == SPIRVEIS_NonSemantic_Kernel_DebugInfo_100)
562+
return transDbgArrayTypeNonSemantic(AT);
563+
564+
return transDbgArrayTypeOpenCL(AT);
565+
}
566+
567+
SPIRVEntry *
568+
LLVMToSPIRVDbgTran::transDbgArrayTypeOpenCL(const DICompositeType *AT) {
555569
using namespace SPIRVDebug::Operand::TypeArray;
556570
SPIRVWordVec Ops(MinOperandCount);
557571
SPIRVEntry *Base = transDbgEntry(AT->getBaseType());
@@ -594,6 +608,80 @@ SPIRVEntry *LLVMToSPIRVDbgTran::transDbgArrayType(const DICompositeType *AT) {
594608
return BM->addDebugInfo(SPIRVDebug::TypeArray, getVoidTy(), Ops);
595609
}
596610

611+
SPIRVEntry *
612+
LLVMToSPIRVDbgTran::transDbgArrayTypeNonSemantic(const DICompositeType *AT) {
613+
using namespace SPIRVDebug::Operand::TypeArray;
614+
SPIRVWordVec Ops(MinOperandCount);
615+
SPIRVEntry *Base = transDbgEntry(AT->getBaseType());
616+
Ops[BaseTypeIdx] = Base->getId();
617+
618+
DINodeArray AR(AT->getElements());
619+
// For N-dimensianal arrays AR.getNumElements() == N
620+
const unsigned N = AR.size();
621+
Ops.resize(SubrangesIdx + N);
622+
for (unsigned I = 0; I < N; ++I) {
623+
DISubrange *SR = cast<DISubrange>(AR[I]);
624+
ConstantInt *Count = SR->getCount().get<ConstantInt *>();
625+
if (AT->isVector()) {
626+
assert(N == 1 && "Multidimensional vector is not expected!");
627+
Ops[ComponentCountIdx] = static_cast<SPIRVWord>(Count->getZExtValue());
628+
return BM->addDebugInfo(SPIRVDebug::TypeVector, getVoidTy(), Ops);
629+
}
630+
Ops[SubrangesIdx + I] = transDbgEntry(SR)->getId();
631+
}
632+
return BM->addDebugInfo(SPIRVDebug::TypeArray, getVoidTy(), Ops);
633+
}
634+
635+
SPIRVEntry *LLVMToSPIRVDbgTran::transDbgSubrangeType(const DISubrange *ST) {
636+
using namespace SPIRVDebug::Operand::TypeSubrange;
637+
SPIRVWordVec Ops(OperandCount);
638+
auto TransOperand = [&Ops, this, ST](int Idx) -> void {
639+
Metadata *RawNode = nullptr;
640+
switch (Idx) {
641+
case LowerBoundIdx:
642+
RawNode = ST->getRawLowerBound();
643+
break;
644+
case UpperBoundIdx:
645+
RawNode = ST->getRawUpperBound();
646+
break;
647+
case CountIdx:
648+
RawNode = ST->getRawCountNode();
649+
break;
650+
case StrideIdx:
651+
RawNode = ST->getRawStride();
652+
break;
653+
}
654+
if (!RawNode) {
655+
Ops[Idx] = getDebugInfoNoneId();
656+
return;
657+
}
658+
if (auto *Node = dyn_cast<MDNode>(RawNode)) {
659+
Ops[Idx] = transDbgEntry(Node)->getId();
660+
} else {
661+
ConstantInt *IntNode = nullptr;
662+
switch (Idx) {
663+
case LowerBoundIdx:
664+
IntNode = ST->getLowerBound().get<ConstantInt *>();
665+
break;
666+
case UpperBoundIdx:
667+
IntNode = ST->getUpperBound().get<ConstantInt *>();
668+
break;
669+
case CountIdx:
670+
IntNode = ST->getCount().get<ConstantInt *>();
671+
break;
672+
case StrideIdx:
673+
IntNode = ST->getStride().get<ConstantInt *>();
674+
break;
675+
}
676+
Ops[Idx] = IntNode ? SPIRVWriter->transValue(IntNode, nullptr)->getId()
677+
: getDebugInfoNoneId();
678+
}
679+
};
680+
for (int Idx = CountIdx; Idx < OperandCount; ++Idx)
681+
TransOperand(Idx);
682+
return BM->addDebugInfo(SPIRVDebug::TypeSubrange, getVoidTy(), Ops);
683+
}
684+
597685
SPIRVEntry *LLVMToSPIRVDbgTran::transDbgTypeDef(const DIDerivedType *DT) {
598686
using namespace SPIRVDebug::Operand::Typedef;
599687
SPIRVWordVec Ops(OperandCount);

lib/SPIRV/LLVMToSPIRVDbgTran.h

+3
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ class LLVMToSPIRVDbgTran {
105105
SPIRVEntry *transDbgPointerType(const DIDerivedType *PT);
106106
SPIRVEntry *transDbgQualifiedType(const DIDerivedType *QT);
107107
SPIRVEntry *transDbgArrayType(const DICompositeType *AT);
108+
SPIRVEntry *transDbgArrayTypeOpenCL(const DICompositeType *AT);
109+
SPIRVEntry *transDbgArrayTypeNonSemantic(const DICompositeType *AT);
110+
SPIRVEntry *transDbgSubrangeType(const DISubrange *ST);
108111
SPIRVEntry *transDbgTypeDef(const DIDerivedType *D);
109112
SPIRVEntry *transDbgSubroutineType(const DISubroutineType *FT);
110113
SPIRVEntry *transDbgEnumType(const DICompositeType *ET);

lib/SPIRV/SPIRVReader.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -2298,6 +2298,7 @@ Value *SPIRVToLLVM::transValueWithoutDecoration(SPIRVValue *BV, Function *F,
22982298
return mapValue(BV, transOCLBuiltinFromExtInst(ExtInst, BB));
22992299
case SPIRVEIS_Debug:
23002300
case SPIRVEIS_OpenCL_DebugInfo_100:
2301+
case SPIRVEIS_NonSemantic_Kernel_DebugInfo_100:
23012302
return mapValue(BV, DbgTran->transDebugIntrinsic(ExtInst, BB));
23022303
default:
23032304
llvm_unreachable("Unknown extended instruction set!");

lib/SPIRV/SPIRVToLLVMDbgTran.cpp

+67-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ SPIRVExtInst *SPIRVToLLVMDbgTran::getDbgInst(const SPIRVId Id) {
9191
if (isa<OpExtInst>(E)) {
9292
SPIRVExtInst *EI = static_cast<SPIRVExtInst *>(E);
9393
if (EI->getExtSetKind() == SPIRV::SPIRVEIS_Debug ||
94-
EI->getExtSetKind() == SPIRV::SPIRVEIS_OpenCL_DebugInfo_100)
94+
EI->getExtSetKind() == SPIRV::SPIRVEIS_OpenCL_DebugInfo_100 ||
95+
EI->getExtSetKind() == SPIRV::SPIRVEIS_NonSemantic_Kernel_DebugInfo_100)
9596
return EI;
9697
}
9798
return nullptr;
@@ -192,6 +193,14 @@ DIType *SPIRVToLLVMDbgTran::transTypePointer(const SPIRVExtInst *DebugInst) {
192193

193194
DICompositeType *
194195
SPIRVToLLVMDbgTran::transTypeArray(const SPIRVExtInst *DebugInst) {
196+
if (DebugInst->getExtSetKind() == SPIRVEIS_NonSemantic_Kernel_DebugInfo_100)
197+
return transTypeArrayNonSemantic(DebugInst);
198+
199+
return transTypeArrayOpenCL(DebugInst);
200+
}
201+
202+
DICompositeType *
203+
SPIRVToLLVMDbgTran::transTypeArrayOpenCL(const SPIRVExtInst *DebugInst) {
195204
using namespace SPIRVDebug::Operand::TypeArray;
196205
const SPIRVWordVec &Ops = DebugInst->getArguments();
197206
assert(Ops.size() >= MinOperandCount && "Invalid number of operands");
@@ -246,6 +255,28 @@ SPIRVToLLVMDbgTran::transTypeArray(const SPIRVExtInst *DebugInst) {
246255
return Builder.createArrayType(Size, 0 /*align*/, BaseTy, SubscriptArray);
247256
}
248257

258+
DICompositeType *
259+
SPIRVToLLVMDbgTran::transTypeArrayNonSemantic(const SPIRVExtInst *DebugInst) {
260+
using namespace SPIRVDebug::Operand::TypeArray;
261+
const SPIRVWordVec &Ops = DebugInst->getArguments();
262+
assert(Ops.size() >= MinOperandCount && "Invalid number of operands");
263+
DIType *BaseTy =
264+
transDebugInst<DIType>(BM->get<SPIRVExtInst>(Ops[BaseTypeIdx]));
265+
size_t TotalCount = 1;
266+
SmallVector<llvm::Metadata *, 8> Subscripts;
267+
if (DebugInst->getExtOp() == SPIRVDebug::TypeArray) {
268+
for (size_t I = SubrangesIdx; I < Ops.size(); ++I) {
269+
auto *SR = transDebugInst<DISubrange>(BM->get<SPIRVExtInst>(Ops[I]));
270+
if (auto *Count = SR->getCount().get<ConstantInt *>())
271+
TotalCount *= Count->getZExtValue() > 0 ? Count->getZExtValue() : 0;
272+
Subscripts.push_back(SR);
273+
}
274+
}
275+
DINodeArray SubscriptArray = Builder.getOrCreateArray(Subscripts);
276+
size_t Size = getDerivedSizeInBits(BaseTy) * TotalCount;
277+
return Builder.createArrayType(Size, 0 /*align*/, BaseTy, SubscriptArray);
278+
}
279+
249280
DICompositeType *
250281
SPIRVToLLVMDbgTran::transTypeVector(const SPIRVExtInst *DebugInst) {
251282
using namespace SPIRVDebug::Operand::TypeVector;
@@ -286,6 +317,8 @@ SPIRVToLLVMDbgTran::transTypeComposite(const SPIRVExtInst *DebugInst) {
286317
SPIRVEntry *SizeEntry = BM->getEntry(Ops[SizeIdx]);
287318
if (!(SizeEntry->isExtInst(SPIRVEIS_Debug, SPIRVDebug::DebugInfoNone) ||
288319
SizeEntry->isExtInst(SPIRVEIS_OpenCL_DebugInfo_100,
320+
SPIRVDebug::DebugInfoNone) ||
321+
SizeEntry->isExtInst(SPIRVEIS_NonSemantic_Kernel_DebugInfo_100,
289322
SPIRVDebug::DebugInfoNone))) {
290323
Size = BM->get<SPIRVConstant>(Ops[SizeIdx])->getZExtIntValue();
291324
}
@@ -341,6 +374,36 @@ SPIRVToLLVMDbgTran::transTypeComposite(const SPIRVExtInst *DebugInst) {
341374
return CT;
342375
}
343376

377+
DISubrange *
378+
SPIRVToLLVMDbgTran::transTypeSubrange(const SPIRVExtInst *DebugInst) {
379+
using namespace SPIRVDebug::Operand::TypeSubrange;
380+
const SPIRVWordVec &Ops = DebugInst->getArguments();
381+
assert(Ops.size() == OperandCount && "Invalid number of operands");
382+
std::vector<Metadata *> TranslatedOps(OperandCount, nullptr);
383+
auto TransOperand = [&Ops, &TranslatedOps, this](int Idx) -> void {
384+
if (!getDbgInst<SPIRVDebug::DebugInfoNone>(Ops[Idx])) {
385+
if (auto *GlobalVar = getDbgInst<SPIRVDebug::GlobalVariable>(Ops[Idx])) {
386+
TranslatedOps[Idx] =
387+
cast<Metadata>(transDebugInst<DIGlobalVariable>(GlobalVar));
388+
} else if (auto *LocalVar =
389+
getDbgInst<SPIRVDebug::LocalVariable>(Ops[Idx])) {
390+
TranslatedOps[Idx] =
391+
cast<Metadata>(transDebugInst<DILocalVariable>(LocalVar));
392+
} else if (auto *Expr = getDbgInst<SPIRVDebug::Expression>(Ops[Idx])) {
393+
TranslatedOps[Idx] = cast<Metadata>(transDebugInst<DIExpression>(Expr));
394+
} else if (auto *Const = BM->get<SPIRVConstant>(Ops[Idx])) {
395+
int64_t ConstantAsInt = static_cast<int64_t>(Const->getZExtIntValue());
396+
TranslatedOps[Idx] = cast<Metadata>(ConstantAsMetadata::get(
397+
ConstantInt::get(M->getContext(), APInt(64, ConstantAsInt))));
398+
}
399+
}
400+
};
401+
for (int Idx = CountIdx; Idx < OperandCount; ++Idx)
402+
TransOperand(Idx);
403+
return Builder.getOrCreateSubrange(TranslatedOps[0], TranslatedOps[1],
404+
TranslatedOps[2], TranslatedOps[3]);
405+
}
406+
344407
DINode *SPIRVToLLVMDbgTran::transTypeMember(const SPIRVExtInst *DebugInst) {
345408
using namespace SPIRVDebug::Operand::TypeMember;
346409
const SPIRVWordVec &Ops = DebugInst->getArguments();
@@ -887,6 +950,9 @@ MDNode *SPIRVToLLVMDbgTran::transDebugInstImpl(const SPIRVExtInst *DebugInst) {
887950
case SPIRVDebug::TypeArray:
888951
return transTypeArray(DebugInst);
889952

953+
case SPIRVDebug::TypeSubrange:
954+
return transTypeSubrange(DebugInst);
955+
890956
case SPIRVDebug::TypeVector:
891957
return transTypeVector(DebugInst);
892958

lib/SPIRV/SPIRVToLLVMDbgTran.h

+7-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ class SPIRVToLLVMDbgTran {
7070
template <typename T = MDNode>
7171
T *transDebugInst(const SPIRVExtInst *DebugInst) {
7272
assert((DebugInst->getExtSetKind() == SPIRVEIS_Debug ||
73-
DebugInst->getExtSetKind() == SPIRVEIS_OpenCL_DebugInfo_100) &&
73+
DebugInst->getExtSetKind() == SPIRVEIS_OpenCL_DebugInfo_100 ||
74+
DebugInst->getExtSetKind() ==
75+
SPIRVEIS_NonSemantic_Kernel_DebugInfo_100) &&
7476
"Unexpected extended instruction set");
7577
auto It = DebugInstCache.find(DebugInst);
7678
if (It != DebugInstCache.end())
@@ -108,11 +110,15 @@ class SPIRVToLLVMDbgTran {
108110
DIType *transTypePointer(const SPIRVExtInst *DebugInst);
109111

110112
DICompositeType *transTypeArray(const SPIRVExtInst *DebugInst);
113+
DICompositeType *transTypeArrayOpenCL(const SPIRVExtInst *DebugInst);
114+
DICompositeType *transTypeArrayNonSemantic(const SPIRVExtInst *DebugInst);
111115

112116
DICompositeType *transTypeVector(const SPIRVExtInst *DebugInst);
113117

114118
DICompositeType *transTypeComposite(const SPIRVExtInst *DebugInst);
115119

120+
DISubrange *transTypeSubrange(const SPIRVExtInst *DebugInst);
121+
116122
DINode *transTypeMember(const SPIRVExtInst *DebugInst);
117123

118124
DINode *transTypeEnum(const SPIRVExtInst *DebugInst);

lib/SPIRV/libSPIRV/SPIRV.debug.h

+13-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ enum Instruction {
5050
ImportedEntity = 34,
5151
Source = 35,
5252
ModuleINTEL = 36,
53-
InstCount = 37
53+
InstCount = 37,
54+
TypeSubrange = 110
5455
};
5556

5657
enum Flag {
@@ -323,12 +324,23 @@ namespace TypeArray {
323324
enum {
324325
BaseTypeIdx = 0,
325326
ComponentCountIdx = 1,
327+
SubrangesIdx = 1,
326328
MinOperandCount = 2
327329
};
328330
}
329331

330332
namespace TypeVector = TypeArray;
331333

334+
namespace TypeSubrange {
335+
enum {
336+
CountIdx = 0,
337+
LowerBoundIdx = 1,
338+
UpperBoundIdx = 2,
339+
StrideIdx = 3,
340+
OperandCount = 4
341+
};
342+
}
343+
332344
namespace Typedef {
333345
enum {
334346
NameIdx = 0,

lib/SPIRV/libSPIRV/SPIRVEnum.h

+3
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ enum SPIRVExtInstSetKind {
7878
SPIRVEIS_OpenCL,
7979
SPIRVEIS_Debug,
8080
SPIRVEIS_OpenCL_DebugInfo_100,
81+
SPIRVEIS_NonSemantic_Kernel_DebugInfo_100,
8182
SPIRVEIS_Count,
8283
};
8384

@@ -129,6 +130,8 @@ template <> inline void SPIRVMap<SPIRVExtInstSetKind, std::string>::init() {
129130
add(SPIRVEIS_OpenCL, "OpenCL.std");
130131
add(SPIRVEIS_Debug, "SPIRV.debug");
131132
add(SPIRVEIS_OpenCL_DebugInfo_100, "OpenCL.DebugInfo.100");
133+
add(SPIRVEIS_NonSemantic_Kernel_DebugInfo_100,
134+
"NonSemantic.Kernel.DebugInfo.100");
132135
}
133136
typedef SPIRVMap<SPIRVExtInstSetKind, std::string> SPIRVBuiltinSetNameMap;
134137

lib/SPIRV/libSPIRV/SPIRVExtInst.h

+1
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ template <> inline void SPIRVMap<SPIRVDebugExtOpKind, std::string>::init() {
239239
"DebugTemplateTemplateParameter");
240240
add(SPIRVDebug::TypeTemplate, "DebugTemplate");
241241
add(SPIRVDebug::TypePtrToMember, "DebugTypePtrToMember,");
242+
add(SPIRVDebug::TypeSubrange, "DebugTypeSubrange");
242243
add(SPIRVDebug::Inheritance, "DebugInheritance");
243244
add(SPIRVDebug::Function, "DebugFunction");
244245
add(SPIRVDebug::FunctionDecl, "DebugFunctionDecl");

lib/SPIRV/libSPIRV/SPIRVFunction.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,14 @@ bool SPIRVFunction::decodeBB(SPIRVDecoder &Decoder) {
161161
Module->add(Inst);
162162
} else {
163163
if (Inst->isExtInst(SPIRVEIS_Debug, SPIRVDebug::Scope) ||
164-
Inst->isExtInst(SPIRVEIS_OpenCL_DebugInfo_100, SPIRVDebug::Scope)) {
164+
Inst->isExtInst(SPIRVEIS_OpenCL_DebugInfo_100, SPIRVDebug::Scope) ||
165+
Inst->isExtInst(SPIRVEIS_NonSemantic_Kernel_DebugInfo_100,
166+
SPIRVDebug::Scope)) {
165167
DebugScope = Inst;
166168
} else if (Inst->isExtInst(SPIRVEIS_Debug, SPIRVDebug::NoScope) ||
167169
Inst->isExtInst(SPIRVEIS_OpenCL_DebugInfo_100,
170+
SPIRVDebug::NoScope) ||
171+
Inst->isExtInst(SPIRVEIS_NonSemantic_Kernel_DebugInfo_100,
168172
SPIRVDebug::NoScope)) {
169173
DebugScope = nullptr;
170174
} else {

lib/SPIRV/libSPIRV/SPIRVInstruction.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -1761,7 +1761,8 @@ class SPIRVExtInst : public SPIRVFunctionCallGeneric<OpExtInst, 5> {
17611761
assert(Module && "Invalid module");
17621762
ExtSetKind = Module->getBuiltinSet(ExtSetId);
17631763
assert((ExtSetKind == SPIRVEIS_OpenCL || ExtSetKind == SPIRVEIS_Debug ||
1764-
ExtSetKind == SPIRVEIS_OpenCL_DebugInfo_100) &&
1764+
ExtSetKind == SPIRVEIS_OpenCL_DebugInfo_100 ||
1765+
ExtSetKind == SPIRVEIS_NonSemantic_Kernel_DebugInfo_100) &&
17651766
"not supported");
17661767
}
17671768
void encode(spv_ostream &O) const override {
@@ -1772,6 +1773,7 @@ class SPIRVExtInst : public SPIRVFunctionCallGeneric<OpExtInst, 5> {
17721773
break;
17731774
case SPIRVEIS_Debug:
17741775
case SPIRVEIS_OpenCL_DebugInfo_100:
1776+
case SPIRVEIS_NonSemantic_Kernel_DebugInfo_100:
17751777
getEncoder(O) << ExtOpDebug;
17761778
break;
17771779
default:
@@ -1789,6 +1791,7 @@ class SPIRVExtInst : public SPIRVFunctionCallGeneric<OpExtInst, 5> {
17891791
break;
17901792
case SPIRVEIS_Debug:
17911793
case SPIRVEIS_OpenCL_DebugInfo_100:
1794+
case SPIRVEIS_NonSemantic_Kernel_DebugInfo_100:
17921795
getDecoder(I) >> ExtOpDebug;
17931796
break;
17941797
default:

lib/SPIRV/libSPIRV/SPIRVModule.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,8 @@ void SPIRVModuleImpl::layoutEntry(SPIRVEntry *E) {
642642
case OpExtInst: {
643643
SPIRVExtInst *EI = static_cast<SPIRVExtInst *>(E);
644644
if ((EI->getExtSetKind() == SPIRVEIS_Debug ||
645-
EI->getExtSetKind() == SPIRVEIS_OpenCL_DebugInfo_100) &&
645+
EI->getExtSetKind() == SPIRVEIS_OpenCL_DebugInfo_100 ||
646+
EI->getExtSetKind() == SPIRVEIS_NonSemantic_Kernel_DebugInfo_100) &&
646647
EI->getExtOp() != SPIRVDebug::Declare &&
647648
EI->getExtOp() != SPIRVDebug::Value &&
648649
EI->getExtOp() != SPIRVDebug::Scope &&

lib/SPIRV/libSPIRV/SPIRVModule.h

+2
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,8 @@ class SPIRVModule {
528528
return SPIRVEIS_Debug;
529529
case DebugInfoEIS::OpenCL_DebugInfo_100:
530530
return SPIRVEIS_OpenCL_DebugInfo_100;
531+
case DebugInfoEIS::NonSemantic_Kernel_DebugInfo_100:
532+
return SPIRVEIS_NonSemantic_Kernel_DebugInfo_100;
531533
}
532534
assert(false && "Unexpected debug info EIS!");
533535
return SPIRVEIS_Debug;

0 commit comments

Comments
 (0)