[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 4 commits: NCG/LA64: adjust register usage to avoid src-register being clobbered
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 2e39a340 by Peng Fan at 2026-02-07T03:42:01-05:00 NCG/LA64: adjust register usage to avoid src-register being clobbered - - - - - 9faf1b35 by Teo Camarasu at 2026-02-07T03:42:43-05:00 ghc-internal: Delete unnecessary GHC.Internal.Data.Ix This module merely re-exports GHC.Internal.Ix. It was copied from `base` when `ghc-internal` was split, but there is no reason to have this now. So, let's delete it. Resolves #26848 - - - - - badaf1da by Sven Tennie at 2026-02-07T06:17:36-05:00 Add cabal.project file to generate-ci This fixes the HLS setup for our CI code generation script (generate-ci). The project file simply makes `generate-ci` of the cabal file discoverable. - - - - - fc696817 by Andreas Klebinger at 2026-02-07T06:17:37-05:00 CI: Don't collapse test results. This puts test output back into the primary test log instead of a subsection removing the need to expand a section to see test results. While the intention was good in practice the old behaviour mostly wastes time by requiring expansion of the section. Fixes #26882 - - - - - 10 changed files: - .gitlab/ci.sh - + .gitlab/generate-ci/cabal.project - compiler/GHC/CmmToAsm/LA64/CodeGen.hs - libraries/base/src/Data/Ix.hs - libraries/ghc-internal/ghc-internal.cabal.in - − libraries/ghc-internal/src/GHC/Internal/Data/Ix.hs - testsuite/tests/interface-stability/base-exports.stdout - testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs - testsuite/tests/interface-stability/base-exports.stdout-mingw32 - testsuite/tests/interface-stability/base-exports.stdout-ws-32 Changes: ===================================== .gitlab/ci.sh ===================================== @@ -655,7 +655,6 @@ function install_bindist() { } function test_hadrian() { - start_section test-hadrian "Test via Hadrian" check_msys2_deps _build/stage1/bin/ghc --version check_release_build @@ -777,7 +776,6 @@ function test_hadrian() { info "STAGE2_TEST=$?" fi - end_section test-hadrian } function summarise_hi_files() { ===================================== .gitlab/generate-ci/cabal.project ===================================== @@ -0,0 +1 @@ +packages: . ===================================== compiler/GHC/CmmToAsm/LA64/CodeGen.hs ===================================== @@ -1784,16 +1784,18 @@ genClz :: Width -> LocalReg -> CmmExpr -> NatM InstrBlock genClz w dst src = do platform <- getPlatform (reg_x, _, code_x) <- getSomeReg src + tmp <- getNewRegNat II64 let dst_reg = getRegisterReg platform (CmmLocal dst) if w `elem` [W32, W64] then do return (code_x `snocOL` CLZ (OpReg w dst_reg) (OpReg w reg_x)) else if w `elem` [W8, W16] then do + -- Process uniformly according to one data length, W32. return (code_x `appOL` toOL [ - MOV (OpReg W64 dst_reg) (OpImm (ImmInt 1)), - SLL (OpReg W64 dst_reg) (OpReg W64 dst_reg) (OpImm (ImmInt (31-shift))), - SLL (OpReg W64 reg_x) (OpReg W64 reg_x) (OpImm (ImmInt (32-shift))), - OR (OpReg W64 dst_reg) (OpReg W64 dst_reg) (OpReg W64 reg_x), + MOV (OpReg W64 tmp) (OpImm (ImmInt 1)), + SLL (OpReg W64 tmp) (OpReg W64 tmp) (OpImm (ImmInt (31-shift))), + SLL (OpReg W64 dst_reg) (OpReg W32 reg_x) (OpImm (ImmInt (32-shift))), + OR (OpReg W64 dst_reg) (OpReg W64 tmp) (OpReg W64 dst_reg), CLZ (OpReg W64 dst_reg) (OpReg W32 dst_reg) ] ) @@ -1806,16 +1808,17 @@ genCtz :: Width -> LocalReg -> CmmExpr -> NatM InstrBlock genCtz w dst src = do platform <- getPlatform (reg_x, _, code_x) <- getSomeReg src + tmp <- getNewRegNat II64 let dst_reg = getRegisterReg platform (CmmLocal dst) if w `elem` [W32, W64] then do return (code_x `snocOL` CTZ (OpReg w dst_reg) (OpReg w reg_x)) else if w `elem` [W8, W16] then do return (code_x `appOL` toOL [ - MOV (OpReg W64 dst_reg) (OpImm (ImmInt 1)), - SLL (OpReg W64 dst_reg) (OpReg W64 dst_reg) (OpImm (ImmInt shift)), - BSTRPICK II64 (OpReg W64 reg_x) (OpReg W64 reg_x) (OpImm (ImmInt (shift-1))) (OpImm (ImmInt 0)), - OR (OpReg W64 dst_reg) (OpReg W64 dst_reg) (OpReg W64 reg_x), + MOV (OpReg W64 tmp) (OpImm (ImmInt 1)), + SLL (OpReg W64 tmp) (OpReg W64 tmp) (OpImm (ImmInt shift)), + BSTRPICK II64 (OpReg W64 dst_reg) (OpReg W64 reg_x) (OpImm (ImmInt (shift-1))) (OpImm (ImmInt 0)), + OR (OpReg W64 dst_reg) (OpReg W64 dst_reg) (OpReg W64 tmp), CTZ (OpReg W64 dst_reg) (OpReg W64 dst_reg) ] ) ===================================== libraries/base/src/Data/Ix.hs ===================================== @@ -1,4 +1,4 @@ -{-# LANGUAGE Safe #-} +{-# LANGUAGE Trustworthy #-} -- | -- @@ -42,4 +42,4 @@ module Data.Ix -- https://www.haskell.org/onlinereport/haskell2010/haskellch19.html. ) where -import GHC.Internal.Data.Ix +import GHC.Internal.Ix ===================================== libraries/ghc-internal/ghc-internal.cabal.in ===================================== @@ -153,7 +153,6 @@ Library GHC.Internal.Data.Functor.Identity GHC.Internal.Data.Functor.Utils GHC.Internal.Data.IORef - GHC.Internal.Data.Ix GHC.Internal.Data.List GHC.Internal.Data.List.NonEmpty GHC.Internal.Data.Maybe ===================================== libraries/ghc-internal/src/GHC/Internal/Data/Ix.hs deleted ===================================== @@ -1,64 +0,0 @@ -{-# LANGUAGE Trustworthy #-} - ------------------------------------------------------------------------------ --- | --- Module : GHC.Internal.Data.Ix --- Copyright : (c) The University of Glasgow 2001 --- License : BSD-style (see the file libraries/base/LICENSE) --- --- Maintainer : libraries@haskell.org --- Stability : stable --- Portability : portable --- --- The 'Ix' class is used to map a contiguous subrange of values in --- type onto integers. It is used primarily for array indexing --- (see the array package). 'Ix' uses row-major order. --- ------------------------------------------------------------------------------ - -module GHC.Internal.Data.Ix - ( - -- * The 'Ix' class - Ix - ( range - , index - , inRange - , rangeSize - ) - -- Ix instances: - -- - -- Ix Char - -- Ix Int - -- Ix Integer - -- Ix Bool - -- Ix Ordering - -- Ix () - -- (Ix a, Ix b) => Ix (a, b) - -- ... - - -- * Deriving Instances of 'Ix' - -- | Derived instance declarations for the class 'Ix' are only possible - -- for enumerations (i.e. datatypes having only nullary constructors) - -- and single-constructor datatypes, including arbitrarily large tuples, - -- whose constituent types are instances of 'Ix'. - -- - -- * For an enumeration, the nullary constructors are assumed to be - -- numbered left-to-right with the indices being 0 to n-1 inclusive. This - -- is the same numbering defined by the 'Enum' class. For example, given - -- the datatype: - -- - -- > data Colour = Red | Orange | Yellow | Green | Blue | Indigo | Violet - -- - -- we would have: - -- - -- > range (Yellow,Blue) == [Yellow,Green,Blue] - -- > index (Yellow,Blue) Green == 1 - -- > inRange (Yellow,Blue) Red == False - -- - -- * For single-constructor datatypes, the derived instance declarations - -- are as shown for tuples in chapter 19, section 2 of the Haskell 2010 report: - -- https://www.haskell.org/onlinereport/haskell2010/haskellch19.html. - - ) where - -import GHC.Internal.Ix ===================================== testsuite/tests/interface-stability/base-exports.stdout ===================================== @@ -1286,7 +1286,7 @@ module Data.Int where data Int8 = ... module Data.Ix where - -- Safety: Safe + -- Safety: Trustworthy type Ix :: * -> Constraint class GHC.Internal.Classes.Ord a => Ix a where range :: (a, a) -> [a] ===================================== testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs ===================================== @@ -1286,7 +1286,7 @@ module Data.Int where data Int8 = ... module Data.Ix where - -- Safety: Safe + -- Safety: Trustworthy type Ix :: * -> Constraint class GHC.Internal.Classes.Ord a => Ix a where range :: (a, a) -> [a] ===================================== testsuite/tests/interface-stability/base-exports.stdout-mingw32 ===================================== @@ -1286,7 +1286,7 @@ module Data.Int where data Int8 = ... module Data.Ix where - -- Safety: Safe + -- Safety: Trustworthy type Ix :: * -> Constraint class GHC.Internal.Classes.Ord a => Ix a where range :: (a, a) -> [a] ===================================== testsuite/tests/interface-stability/base-exports.stdout-ws-32 ===================================== @@ -1286,7 +1286,7 @@ module Data.Int where data Int8 = ... module Data.Ix where - -- Safety: Safe + -- Safety: Trustworthy type Ix :: * -> Constraint class GHC.Internal.Classes.Ord a => Ix a where range :: (a, a) -> [a] View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fcf250997fce8696ccefe2cc8a671b9... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fcf250997fce8696ccefe2cc8a671b9... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)