diff options
author | sheaf <sam.derbyshire@gmail.com> | 2023-01-27 13:43:44 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-01-31 15:51:06 -0500 |
commit | 5618fc21dc480f88ac7cbe14337e72c92b8001d7 (patch) | |
tree | d627c46b9f7f4a636d45ae75b0ed1104e74eb436 /compiler/GHC/CmmToLlvm/Regs.hs | |
parent | a2d814dc84dbdcdb6c1e274b8bd7c212cc98c39e (diff) | |
download | haskell-5618fc21dc480f88ac7cbe14337e72c92b8001d7.tar.gz |
Cmm: track the type of global registers
This patch tracks the type of Cmm global registers. This is needed
in order to lint uses of polymorphic registers, such as SIMD vector
registers that can be used both for floating-point and integer values.
This changes allows us to refactor VanillaReg to not store VGcPtr,
as that information is instead stored in the type of the usage of the
register.
Fixes #22297
Diffstat (limited to 'compiler/GHC/CmmToLlvm/Regs.hs')
-rw-r--r-- | compiler/GHC/CmmToLlvm/Regs.hs | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/compiler/GHC/CmmToLlvm/Regs.hs b/compiler/GHC/CmmToLlvm/Regs.hs index b18df77ed4..691f55eaaf 100644 --- a/compiler/GHC/CmmToLlvm/Regs.hs +++ b/compiler/GHC/CmmToLlvm/Regs.hs @@ -37,16 +37,16 @@ lmGlobalReg platform suf reg BaseReg -> ptrGlobal $ "Base" ++ suf Sp -> ptrGlobal $ "Sp" ++ suf Hp -> ptrGlobal $ "Hp" ++ suf - VanillaReg 1 _ -> wordGlobal $ "R1" ++ suf - VanillaReg 2 _ -> wordGlobal $ "R2" ++ suf - VanillaReg 3 _ -> wordGlobal $ "R3" ++ suf - VanillaReg 4 _ -> wordGlobal $ "R4" ++ suf - VanillaReg 5 _ -> wordGlobal $ "R5" ++ suf - VanillaReg 6 _ -> wordGlobal $ "R6" ++ suf - VanillaReg 7 _ -> wordGlobal $ "R7" ++ suf - VanillaReg 8 _ -> wordGlobal $ "R8" ++ suf - VanillaReg 9 _ -> wordGlobal $ "R9" ++ suf - VanillaReg 10 _ -> wordGlobal $ "R10" ++ suf + VanillaReg 1 -> wordGlobal $ "R1" ++ suf + VanillaReg 2 -> wordGlobal $ "R2" ++ suf + VanillaReg 3 -> wordGlobal $ "R3" ++ suf + VanillaReg 4 -> wordGlobal $ "R4" ++ suf + VanillaReg 5 -> wordGlobal $ "R5" ++ suf + VanillaReg 6 -> wordGlobal $ "R6" ++ suf + VanillaReg 7 -> wordGlobal $ "R7" ++ suf + VanillaReg 8 -> wordGlobal $ "R8" ++ suf + VanillaReg 9 -> wordGlobal $ "R9" ++ suf + VanillaReg 10 -> wordGlobal $ "R10" ++ suf SpLim -> wordGlobal $ "SpLim" ++ suf FloatReg 1 -> floatGlobal $ "F1" ++ suf FloatReg 2 -> floatGlobal $ "F2" ++ suf @@ -129,8 +129,8 @@ tbaa = fsLit "tbaa" -- | Get the correct TBAA metadata information for this register type getTBAA :: GlobalReg -> Unique -getTBAA BaseReg = baseN -getTBAA Sp = stackN -getTBAA Hp = heapN -getTBAA (VanillaReg _ _) = rxN -getTBAA _ = topN +getTBAA BaseReg = baseN +getTBAA Sp = stackN +getTBAA Hp = heapN +getTBAA (VanillaReg _) = rxN +getTBAA _ = topN |