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

Commits:

10 changed files:

Changes:

  • .gitlab/ci.sh
    ... ... @@ -655,7 +655,6 @@ function install_bindist() {
    655 655
     }
    
    656 656
     
    
    657 657
     function test_hadrian() {
    
    658
    -  start_section test-hadrian "Test via Hadrian"
    
    659 658
       check_msys2_deps _build/stage1/bin/ghc --version
    
    660 659
       check_release_build
    
    661 660
     
    
    ... ... @@ -777,7 +776,6 @@ function test_hadrian() {
    777 776
         info "STAGE2_TEST=$?"
    
    778 777
     
    
    779 778
       fi
    
    780
    -  end_section test-hadrian
    
    781 779
     }
    
    782 780
     
    
    783 781
     function summarise_hi_files() {
    

  • .gitlab/generate-ci/cabal.project
    1
    +packages: .

  • compiler/GHC/CmmToAsm/LA64/CodeGen.hs
    ... ... @@ -1784,16 +1784,18 @@ genClz :: Width -> LocalReg -> CmmExpr -> NatM InstrBlock
    1784 1784
     genClz w dst src = do
    
    1785 1785
       platform <- getPlatform
    
    1786 1786
       (reg_x, _, code_x) <- getSomeReg src
    
    1787
    +  tmp <- getNewRegNat II64
    
    1787 1788
       let dst_reg = getRegisterReg platform (CmmLocal dst)
    
    1788 1789
       if w `elem` [W32, W64] then do
    
    1789 1790
         return (code_x `snocOL` CLZ (OpReg w dst_reg) (OpReg w reg_x))
    
    1790 1791
       else if w `elem` [W8, W16] then do
    
    1792
    +    -- Process uniformly according to one data length, W32.
    
    1791 1793
         return (code_x `appOL` toOL
    
    1792 1794
                      [
    
    1793
    -                  MOV (OpReg W64 dst_reg) (OpImm (ImmInt 1)),
    
    1794
    -                  SLL (OpReg W64 dst_reg) (OpReg W64 dst_reg) (OpImm (ImmInt (31-shift))),
    
    1795
    -                  SLL (OpReg W64 reg_x) (OpReg W64 reg_x) (OpImm (ImmInt (32-shift))),
    
    1796
    -                  OR (OpReg W64 dst_reg) (OpReg W64 dst_reg) (OpReg W64 reg_x),
    
    1795
    +                  MOV (OpReg W64 tmp) (OpImm (ImmInt 1)),
    
    1796
    +                  SLL (OpReg W64 tmp) (OpReg W64 tmp) (OpImm (ImmInt (31-shift))),
    
    1797
    +                  SLL (OpReg W64 dst_reg) (OpReg W32 reg_x) (OpImm (ImmInt (32-shift))),
    
    1798
    +                  OR (OpReg W64 dst_reg) (OpReg W64 tmp) (OpReg W64 dst_reg),
    
    1797 1799
                       CLZ (OpReg W64 dst_reg) (OpReg W32 dst_reg)
    
    1798 1800
                      ]
    
    1799 1801
                )
    
    ... ... @@ -1806,16 +1808,17 @@ genCtz :: Width -> LocalReg -> CmmExpr -> NatM InstrBlock
    1806 1808
     genCtz w dst src = do
    
    1807 1809
       platform <- getPlatform
    
    1808 1810
       (reg_x, _, code_x) <- getSomeReg src
    
    1811
    +  tmp <- getNewRegNat II64
    
    1809 1812
       let dst_reg = getRegisterReg platform (CmmLocal dst)
    
    1810 1813
       if w `elem` [W32, W64] then do
    
    1811 1814
         return (code_x `snocOL` CTZ (OpReg w dst_reg) (OpReg w reg_x))
    
    1812 1815
       else if w `elem` [W8, W16] then do
    
    1813 1816
         return (code_x `appOL` toOL
    
    1814 1817
                      [
    
    1815
    -                  MOV (OpReg W64 dst_reg) (OpImm (ImmInt 1)),
    
    1816
    -                  SLL (OpReg W64 dst_reg) (OpReg W64 dst_reg) (OpImm (ImmInt shift)),
    
    1817
    -                  BSTRPICK II64 (OpReg W64 reg_x) (OpReg W64 reg_x) (OpImm (ImmInt (shift-1))) (OpImm (ImmInt 0)),
    
    1818
    -                  OR  (OpReg W64 dst_reg) (OpReg W64 dst_reg) (OpReg W64 reg_x),
    
    1818
    +                  MOV (OpReg W64 tmp) (OpImm (ImmInt 1)),
    
    1819
    +                  SLL (OpReg W64 tmp) (OpReg W64 tmp) (OpImm (ImmInt shift)),
    
    1820
    +                  BSTRPICK II64 (OpReg W64 dst_reg) (OpReg W64 reg_x) (OpImm (ImmInt (shift-1))) (OpImm (ImmInt 0)),
    
    1821
    +                  OR  (OpReg W64 dst_reg) (OpReg W64 dst_reg) (OpReg W64 tmp),
    
    1819 1822
                       CTZ (OpReg W64 dst_reg) (OpReg W64 dst_reg)
    
    1820 1823
                      ]
    
    1821 1824
                )
    

  • libraries/base/src/Data/Ix.hs
    1
    -{-# LANGUAGE Safe #-}
    
    1
    +{-# LANGUAGE Trustworthy #-}
    
    2 2
     
    
    3 3
     -- |
    
    4 4
     --
    
    ... ... @@ -42,4 +42,4 @@ module Data.Ix
    42 42
          -- <https://www.haskell.org/onlinereport/haskell2010/haskellch19.html>.
    
    43 43
          ) where
    
    44 44
     
    
    45
    -import GHC.Internal.Data.Ix
    45
    +import GHC.Internal.Ix

  • libraries/ghc-internal/ghc-internal.cabal.in
    ... ... @@ -153,7 +153,6 @@ Library
    153 153
             GHC.Internal.Data.Functor.Identity
    
    154 154
             GHC.Internal.Data.Functor.Utils
    
    155 155
             GHC.Internal.Data.IORef
    
    156
    -        GHC.Internal.Data.Ix
    
    157 156
             GHC.Internal.Data.List
    
    158 157
             GHC.Internal.Data.List.NonEmpty
    
    159 158
             GHC.Internal.Data.Maybe
    

  • libraries/ghc-internal/src/GHC/Internal/Data/Ix.hs deleted
    1
    -{-# LANGUAGE Trustworthy #-}
    
    2
    -
    
    3
    ------------------------------------------------------------------------------
    
    4
    --- |
    
    5
    --- Module      :  GHC.Internal.Data.Ix
    
    6
    --- Copyright   :  (c) The University of Glasgow 2001
    
    7
    --- License     :  BSD-style (see the file libraries/base/LICENSE)
    
    8
    ---
    
    9
    --- Maintainer  :  libraries@haskell.org
    
    10
    --- Stability   :  stable
    
    11
    --- Portability :  portable
    
    12
    ---
    
    13
    --- The 'Ix' class is used to map a contiguous subrange of values in
    
    14
    --- type onto integers.  It is used primarily for array indexing
    
    15
    --- (see the array package).  'Ix' uses row-major order.
    
    16
    ---
    
    17
    ------------------------------------------------------------------------------
    
    18
    -
    
    19
    -module GHC.Internal.Data.Ix
    
    20
    -    (
    
    21
    -    -- * The 'Ix' class
    
    22
    -        Ix
    
    23
    -          ( range
    
    24
    -          , index
    
    25
    -          , inRange
    
    26
    -          , rangeSize
    
    27
    -          )
    
    28
    -    -- Ix instances:
    
    29
    -    --
    
    30
    -    --  Ix Char
    
    31
    -    --  Ix Int
    
    32
    -    --  Ix Integer
    
    33
    -    --  Ix Bool
    
    34
    -    --  Ix Ordering
    
    35
    -    --  Ix ()
    
    36
    -    --  (Ix a, Ix b) => Ix (a, b)
    
    37
    -    --  ...
    
    38
    -
    
    39
    -    -- * Deriving Instances of 'Ix'
    
    40
    -    -- | Derived instance declarations for the class 'Ix' are only possible
    
    41
    -    -- for enumerations (i.e. datatypes having only nullary constructors)
    
    42
    -    -- and single-constructor datatypes, including arbitrarily large tuples,
    
    43
    -    -- whose constituent types are instances of 'Ix'.
    
    44
    -    --
    
    45
    -    -- * For an enumeration, the nullary constructors are assumed to be
    
    46
    -    -- numbered left-to-right with the indices being 0 to n-1 inclusive. This
    
    47
    -    -- is the same numbering defined by the 'Enum' class. For example, given
    
    48
    -    -- the datatype:
    
    49
    -    --
    
    50
    -    -- >        data Colour = Red | Orange | Yellow | Green | Blue | Indigo | Violet
    
    51
    -    --
    
    52
    -    -- we would have:
    
    53
    -    --
    
    54
    -    -- >        range   (Yellow,Blue)        ==  [Yellow,Green,Blue]
    
    55
    -    -- >        index   (Yellow,Blue) Green  ==  1
    
    56
    -    -- >        inRange (Yellow,Blue) Red    ==  False
    
    57
    -    --
    
    58
    -    -- * For single-constructor datatypes, the derived instance declarations
    
    59
    -    -- are as shown for tuples in chapter 19, section 2 of the Haskell 2010 report:
    
    60
    -    -- <https://www.haskell.org/onlinereport/haskell2010/haskellch19.html>.
    
    61
    -
    
    62
    -    ) where
    
    63
    -
    
    64
    -import GHC.Internal.Ix

  • testsuite/tests/interface-stability/base-exports.stdout
    ... ... @@ -1286,7 +1286,7 @@ module Data.Int where
    1286 1286
       data Int8 = ...
    
    1287 1287
     
    
    1288 1288
     module Data.Ix where
    
    1289
    -  -- Safety: Safe
    
    1289
    +  -- Safety: Trustworthy
    
    1290 1290
       type Ix :: * -> Constraint
    
    1291 1291
       class GHC.Internal.Classes.Ord a => Ix a where
    
    1292 1292
         range :: (a, a) -> [a]
    

  • testsuite/tests/interface-stability/base-exports.stdout-javascript-unknown-ghcjs
    ... ... @@ -1286,7 +1286,7 @@ module Data.Int where
    1286 1286
       data Int8 = ...
    
    1287 1287
     
    
    1288 1288
     module Data.Ix where
    
    1289
    -  -- Safety: Safe
    
    1289
    +  -- Safety: Trustworthy
    
    1290 1290
       type Ix :: * -> Constraint
    
    1291 1291
       class GHC.Internal.Classes.Ord a => Ix a where
    
    1292 1292
         range :: (a, a) -> [a]
    

  • testsuite/tests/interface-stability/base-exports.stdout-mingw32
    ... ... @@ -1286,7 +1286,7 @@ module Data.Int where
    1286 1286
       data Int8 = ...
    
    1287 1287
     
    
    1288 1288
     module Data.Ix where
    
    1289
    -  -- Safety: Safe
    
    1289
    +  -- Safety: Trustworthy
    
    1290 1290
       type Ix :: * -> Constraint
    
    1291 1291
       class GHC.Internal.Classes.Ord a => Ix a where
    
    1292 1292
         range :: (a, a) -> [a]
    

  • testsuite/tests/interface-stability/base-exports.stdout-ws-32
    ... ... @@ -1286,7 +1286,7 @@ module Data.Int where
    1286 1286
       data Int8 = ...
    
    1287 1287
     
    
    1288 1288
     module Data.Ix where
    
    1289
    -  -- Safety: Safe
    
    1289
    +  -- Safety: Trustworthy
    
    1290 1290
       type Ix :: * -> Constraint
    
    1291 1291
       class GHC.Internal.Classes.Ord a => Ix a where
    
    1292 1292
         range :: (a, a) -> [a]