[llvm] [SPIRV] Add FPVariant tracking for floating-point registers in SPIR-V (PR #156871)
Steven Perron via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 8 11:21:44 PDT 2025
================
@@ -2088,3 +2100,17 @@ bool SPIRVGlobalRegistry::hasBlockDecoration(SPIRVType *Type) const {
}
return false;
}
+
+SPIRVGlobalRegistry::FPVariant
+SPIRVGlobalRegistry::getFPVariantForVReg(Register VReg,
+ const MachineFunction *MF) {
+ const MachineFunction *Func = MF ? MF : CurMF;
+ auto FuncIt = VRegFPVariantMap.find(Func);
+ if (FuncIt != VRegFPVariantMap.end()) {
+ const DenseMap<Register, FPVariant> &VRegMap = FuncIt->second;
+ auto VRegIt = VRegMap.find(VReg);
+ if (VRegIt != VRegMap.end())
+ return VRegIt->second;
+ }
+ return FPVariant::NONE;
----------------
s-perron wrote:
This could happen if the register is not a floating pointer register right? I think we still want want.
https://github.com/llvm/llvm-project/pull/156871
More information about the llvm-commits
mailing list