[Git][ghc/ghc][wip/ncg-simd] more tidying

sheaf (@sheaf) gitlab at gitlab.haskell.org
Fri Jun 14 15:54:33 UTC 2024



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


Commits:
d565519c by sheaf at 2024-06-14T17:54:19+02:00
more tidying

- - - - -


5 changed files:

- compiler/GHC/Cmm/CallConv.hs
- compiler/GHC/CmmToAsm/Format.hs
- compiler/GHC/CmmToAsm/X86/RegInfo.hs
- − compiler/ghc-llvm-version.h
- libraries/base/src/GHC/Base.hs


Changes:

=====================================
compiler/GHC/Cmm/CallConv.hs
=====================================
@@ -236,8 +236,6 @@ realArgRegsCover platform
       realDoubleRegs  platform ++
       realLongRegs    platform
         -- we don't save XMM registers if they are not used for parameter passing
--- SLD TODO: do we need to save xmm/ymm registers now as well?
-
 
 {-
 


=====================================
compiler/GHC/CmmToAsm/Format.hs
=====================================
@@ -54,7 +54,7 @@ These include:
 
  * 'Format.ScalarFormat': The format of a 'Format.VecFormat'\'s scalar.
 
- * 'RegClass.RegClass': Whether a register is an integer, float-point, or vector register
+ * 'RegClass.RegClass': Whether a register is an integer or a floating point/vector register.
 -}
 
 -- It looks very like the old MachRep, but it's now of purely local


=====================================
compiler/GHC/CmmToAsm/X86/RegInfo.hs
=====================================
@@ -29,8 +29,7 @@ mkVirtualReg u format
         -- For now we map both to being allocated as "Double" Registers
         -- on X86/X86_64
         FF64    -> VirtualRegD u
-        --TODO:
-        -- Add VirtualRegAVX and inspect VecFormat and allocate
+        -- SIMD NCG TODO: add support for 256 and 512-wide vectors.
         VecFormat {} -> VirtualRegV128 u
         _other  -> VirtualRegI u
 


=====================================
compiler/ghc-llvm-version.h deleted
=====================================
@@ -1,11 +0,0 @@
-/* compiler/ghc-llvm-version.h.  Generated from ghc-llvm-version.h.in by configure.  */
-#if !defined(__GHC_LLVM_VERSION_H__)
-#define __GHC_LLVM_VERSION_H__
-
-/* The maximum supported LLVM version number */
-#define sUPPORTED_LLVM_VERSION_MAX (16)
-
-/* The minimum supported LLVM version number */
-#define sUPPORTED_LLVM_VERSION_MIN (13)
-
-#endif /* __GHC_LLVM_VERSION_H__ */


=====================================
libraries/base/src/GHC/Base.hs
=====================================
@@ -139,11 +139,71 @@ module GHC.Base
     ) where
 
 import GHC.Internal.Base
-import GHC.Prim hiding (dataToTagLarge#, dataToTagSmall#, whereFrom#)
-   -- Hide dataToTagLarge# because it is expected to break for
-   -- GHC-internal reasons in the near future, and shouldn't
-   -- be exposed from base (not even GHC.Exts)
-   -- whereFrom# is similarly internal.
+import GHC.Prim hiding
+  (
+  -- Hide dataToTag# ops because they are expected to break for
+  -- GHC-internal reasons in the near future, and shouldn't
+  -- be exposed from base
+    dataToTagSmall#, dataToTagLarge#
+  -- whereFrom# is similarly internal.
+  , whereFrom#
+  -- Don't re-export vector FMA instructions
+  , fmaddFloatX4#
+  , fmsubFloatX4#
+  , fnmaddFloatX4#
+  , fnmsubFloatX4#
+  , fmaddFloatX8#
+  , fmsubFloatX8#
+  , fnmaddFloatX8#
+  , fnmsubFloatX8#
+  , fmaddFloatX16#
+  , fmsubFloatX16#
+  , fnmaddFloatX16#
+  , fnmsubFloatX16#
+  , fmaddDoubleX2#
+  , fmsubDoubleX2#
+  , fnmaddDoubleX2#
+  , fnmsubDoubleX2#
+  , fmaddDoubleX4#
+  , fmsubDoubleX4#
+  , fnmaddDoubleX4#
+  , fnmsubDoubleX4#
+  , fmaddDoubleX8#
+  , fmsubDoubleX8#
+  , fnmaddDoubleX8#
+  , fnmsubDoubleX8#
+  -- Don't re-export SIMD shuffle primops
+  , shuffleDoubleX2#
+  , shuffleDoubleX4#
+  , shuffleDoubleX8#
+  , shuffleFloatX16#
+  , shuffleFloatX4#
+  , shuffleFloatX8#
+  , shuffleInt16X16#
+  , shuffleInt16X32#
+  , shuffleInt16X8#
+  , shuffleInt32X16#
+  , shuffleInt32X4#
+  , shuffleInt32X8#
+  , shuffleInt64X2#
+  , shuffleInt64X4#
+  , shuffleInt64X8#
+  , shuffleInt8X16#
+  , shuffleInt8X32#
+  , shuffleInt8X64#
+  , shuffleWord16X16#
+  , shuffleWord16X32#
+  , shuffleWord16X8#
+  , shuffleWord32X16#
+  , shuffleWord32X4#
+  , shuffleWord32X8#
+  , shuffleWord64X2#
+  , shuffleWord64X4#
+  , shuffleWord64X8#
+  , shuffleWord8X16#
+  , shuffleWord8X32#
+  , shuffleWord8X64#
+  )
 
 import GHC.Prim.Ext
 import GHC.Prim.PtrEq



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d565519c80be8d180ec6cfd19fc81947ba1999a0

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/d565519c80be8d180ec6cfd19fc81947ba1999a0
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/20240614/f26bedca/attachment-0001.html>


More information about the ghc-commits mailing list