[llvm] [SPIRV] Fix non-deterministic compiler output for debug type pointer (PR #182773)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 22 14:00:25 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-spir-v
Author: Dmitry Sidorov (MrSidims)
<details>
<summary>Changes</summary>
Fixes: https://github.com/llvm/llvm-project/issues/123791
---
Full diff: https://github.com/llvm/llvm-project/pull/182773.diff
1 Files Affected:
- (modified) llvm/lib/Target/SPIRV/SPIRVEmitNonSemanticDI.cpp (+3-3)
``````````diff
diff --git a/llvm/lib/Target/SPIRV/SPIRVEmitNonSemanticDI.cpp b/llvm/lib/Target/SPIRV/SPIRVEmitNonSemanticDI.cpp
index a9208f00c1113..4e4b9fdffa7f0 100644
--- a/llvm/lib/Target/SPIRV/SPIRVEmitNonSemanticDI.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVEmitNonSemanticDI.cpp
@@ -5,7 +5,7 @@
#include "SPIRVRegisterInfo.h"
#include "SPIRVTargetMachine.h"
#include "SPIRVUtils.h"
-#include "llvm/ADT/SmallPtrSet.h"
+#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
@@ -94,8 +94,8 @@ bool SPIRVEmitNonSemanticDI::emitGlobalDI(MachineFunction &MF) {
SmallVector<int64_t> LLVMSourceLanguages;
int64_t DwarfVersion = 0;
int64_t DebugInfoVersion = 0;
- SmallPtrSet<DIBasicType *, 12> BasicTypes;
- SmallPtrSet<DIDerivedType *, 12> PointerDerivedTypes;
+ SetVector<DIBasicType *> BasicTypes;
+ SetVector<DIDerivedType *> PointerDerivedTypes;
// Searching through the Module metadata to find nescessary
// information like DwarfVersion or SourceLanguage
{
``````````
</details>
https://github.com/llvm/llvm-project/pull/182773
More information about the llvm-commits
mailing list