@@ -700,7 +700,7 @@ void SPIRVToLLVM::setLLVMLoopMetadata(const LoopInstType *LM,
700700 if (!LM)
701701 return ;
702702
703- auto Temp = MDNode::getTemporary (*Context, std:: nullopt );
703+ auto Temp = MDNode::getTemporary (*Context, {} );
704704 auto *Self = MDNode::get (*Context, Temp.get ());
705705 Self->replaceOperandWith (0 , Self);
706706 SPIRVWord LC = LM->getLoopControl ();
@@ -850,8 +850,7 @@ void SPIRVToLLVM::setLLVMLoopMetadata(const LoopInstType *LM,
850850 // Emit a distinct index group that will be referenced from
851851 // llvm.loop.parallel_access_indices metadata; hash the new
852852 // MDNode for future accesses to the same memory.
853- CurrentDepthIdxGroup =
854- llvm::MDNode::getDistinct (*Context, std::nullopt );
853+ CurrentDepthIdxGroup = llvm::MDNode::getDistinct (*Context, {});
855854 OffsetIdxGroupMap.emplace (Info, CurrentDepthIdxGroup);
856855 } else {
857856 // Previous accesses to that field have already been indexed,
@@ -861,8 +860,7 @@ void SPIRVToLLVM::setLLVMLoopMetadata(const LoopInstType *LM,
861860 } else /* Regular kernel-scope array/pointer variable */ {
862861 // Emit a distinct index group that will be referenced from
863862 // llvm.loop.parallel_access_indices metadata
864- CurrentDepthIdxGroup =
865- llvm::MDNode::getDistinct (*Context, std::nullopt );
863+ CurrentDepthIdxGroup = llvm::MDNode::getDistinct (*Context, {});
866864 }
867865
868866 unsigned Safelen = PointerSflnMap.find (ArrayGEPIt.first )->second ;
0 commit comments