[llvm] [SPIRV] Add FPEncoding operand support for OpTypeFloat (PR #156871)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 10 06:52:20 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;
----------------
YixingZhang007 wrote:
Thanks for the suggestion! I’ve updated the approach for representing floating-point types in the PR, and `FPVariant` is no longer used. Please let me know if there’s anything I can improve with the current approach. Thank you! :)
https://github.com/llvm/llvm-project/pull/156871
More information about the llvm-commits
mailing list