[Git][ghc/ghc][wip/ncg-simd] 2 commits: realArgRegsCover: only save/restore GP regs

sheaf (@sheaf) gitlab at gitlab.haskell.org
Mon Aug 26 18:53:18 UTC 2024



sheaf pushed to branch wip/ncg-simd at Glasgow Haskell Compiler / GHC


Commits:
26304ce4 by sheaf at 2024-08-26T20:53:02+02:00
realArgRegsCover: only save/restore GP regs

This commit changes the meaning of the [*] annotation in low-level Cmm.
It now only means that general-purpose registers should be considered
live.

The idea is that we don't want to have to deal with saving/restoring
vector registers, as explained in Note [Caller-saved registers in low-level Cmm].
So we instead rely on the C functions we call to leave all SIMD
registers intact, by making use of __attribute__((target("general-regs-only")))
among other things.

Fixes #25169

- - - - -
b5b1db77 by sheaf at 2024-08-26T20:53:02+02:00
Modularise RegClass

This commit modularises the RegClass datatype, allowing it to be
used with architectures that have different register architectures, e.g.
RISC-V which has separate floating-point and vector registers.

The two modules GHC.Platform.Reg.Class.Unified and
GHC.Platform.Reg.Class.Separate implement the two register architectures
we currently support (corresponding to the two constructors of the
GHC.Platform.Reg.Class.RegArch datatype).

- - - - -


30 changed files:

- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/Cmm/CallConv.hs
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Regs.hs
- compiler/GHC/CmmToAsm/PPC/CodeGen.hs
- compiler/GHC/CmmToAsm/PPC/Instr.hs
- compiler/GHC/CmmToAsm/PPC/Ppr.hs
- compiler/GHC/CmmToAsm/PPC/Regs.hs
- compiler/GHC/CmmToAsm/Reg/Graph.hs
- compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs
- compiler/GHC/CmmToAsm/Reg/Linear.hs
- compiler/GHC/CmmToAsm/Reg/Linear/AArch64.hs
- compiler/GHC/CmmToAsm/Reg/Linear/FreeRegs.hs
- compiler/GHC/CmmToAsm/Reg/Linear/PPC.hs
- compiler/GHC/CmmToAsm/Reg/Linear/X86.hs
- compiler/GHC/CmmToAsm/Reg/Linear/X86_64.hs
- compiler/GHC/CmmToAsm/Reg/Target.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/CmmToAsm/X86/Instr.hs
- compiler/GHC/CmmToAsm/X86/Regs.hs
- compiler/GHC/CmmToLlvm/Base.hs
- compiler/GHC/Platform/Reg.hs
- compiler/GHC/Platform/Reg/Class.hs
- + compiler/GHC/Platform/Reg/Class/NoVectors.hs
- + compiler/GHC/Platform/Reg/Class/Separate.hs
- + compiler/GHC/Platform/Reg/Class/Unified.hs
- compiler/GHC/StgToByteCode.hs
- compiler/GHC/StgToCmm/Foreign.hs
- compiler/GHC/StgToCmm/Utils.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/969d6846dab7d66595a8d7af904016207c7f6740...b5b1db776b20041c0a1ba20ca47bad14bd1446f6

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/969d6846dab7d66595a8d7af904016207c7f6740...b5b1db776b20041c0a1ba20ca47bad14bd1446f6
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240826/4ac03fc4/attachment.html>


More information about the ghc-commits mailing list