[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 3 commits: haddock: Add missing requirements.txt for the online manual

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Sun Sep 8 13:28:49 UTC 2024



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
958b4518 by Hécate Kleidukos at 2024-09-06T16:40:56-04:00
haddock: Add missing requirements.txt for the online manual

- - - - -
573f9833 by Sven Tennie at 2024-09-08T09:58:21+00:00
AArch64: Implement takeRegRegMoveInstr

This has likely been forgotten.

- - - - -
faf45b7b by Hécate Kleidukos at 2024-09-08T09:28:41-04:00
haddock: Configuration fix for ReadTheDocs

- - - - -


3 changed files:

- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- utils/haddock/.readthedocs.yaml
- + utils/haddock/doc/requirements.txt


Changes:

=====================================
compiler/GHC/CmmToAsm/AArch64/Instr.hs
=====================================
@@ -30,6 +30,7 @@ import GHC.Utils.Panic
 import Data.Maybe (fromMaybe)
 
 import GHC.Stack
+import GHC.Platform.Reg.Class
 
 -- | LR and FP (8 byte each) are the prologue of each stack frame
 stackFrameHeaderSize :: Int
@@ -454,10 +455,22 @@ isMetaInstr instr
 mkRegRegMoveInstr :: Reg -> Reg -> Instr
 mkRegRegMoveInstr src dst = ANN (text "Reg->Reg Move: " <> ppr src <> text " -> " <> ppr dst) $ MOV (OpReg W64 dst) (OpReg W64 src)
 
--- | Take the source and destination from this reg -> reg move instruction
--- or Nothing if it's not one
+-- | Take the source and destination registers from a move instruction of same
+-- register class (`RegClass`).
+--
+-- The idea is to identify moves that can be eliminated by the register
+-- allocator: If the source register serves no special purpose, one could
+-- continue using it; saving one move instruction. For this, the register kinds
+-- (classes) must be the same (no conversion involved.)
 takeRegRegMoveInstr :: Instr -> Maybe (Reg,Reg)
---takeRegRegMoveInstr (MOV (OpReg fmt dst) (OpReg fmt' src)) | fmt == fmt' = Just (src, dst)
+takeRegRegMoveInstr (MOV (OpReg _fmt dst) (OpReg _fmt' src))
+  | classOfReg dst == classOfReg src = pure (src, dst)
+  where
+    classOfReg ::Reg -> RegClass
+    classOfReg reg
+      = case reg of
+        RegVirtual vr -> classOfVirtualReg vr
+        RegReal rr -> classOfRealReg rr
 takeRegRegMoveInstr _ = Nothing
 
 -- | Make an unconditional jump instruction.


=====================================
utils/haddock/.readthedocs.yaml
=====================================
@@ -2,7 +2,7 @@
 version: 2
 
 sphinx:
-  configuration: doc/conf.py
+  configuration: utils/haddock/doc/conf.py
 
 build:
   os: "ubuntu-22.04"
@@ -11,4 +11,4 @@ build:
 
 python:
   install:
-    - requirements: doc/requirements.txt
+    - requirements: utils/haddock/doc/requirements.txt


=====================================
utils/haddock/doc/requirements.txt
=====================================
@@ -0,0 +1 @@
+sphinxcontrib-applehelp ==2.0.0



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5bba677e1bd93fc514b66283b87fd281fc620402...faf45b7b2153085e16fca4e9f39f61234a3a8e4b

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5bba677e1bd93fc514b66283b87fd281fc620402...faf45b7b2153085e16fca4e9f39f61234a3a8e4b
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/20240908/ceb16c8f/attachment-0001.html>


More information about the ghc-commits mailing list