Remove target dependent CPP for Word64/Int64 (#11470)
Primops types were dependent on the target word-size at *compiler* compilation time. It's an issue for multi-target as GHC may not have the correct primops types for the target. This patch fixes some primops types: if they take or return fixed 64-bit values they now always use `Int64#/Word64#`, even on 64-bit architectures (where they used `Int#/Word#` before). Users of these primops may now need to convert from Int64#/Word64# to Int#/Word# (a no-op at runtime). This is a stripped down version of !3658 which goes the all way of changing the underlying primitive types of Word64/Int64. This is left for future work. T12545 allocations increase ~4% on some CI platforms and decrease ~3% on AArch64. Metric Increase: T12545 Metric Decrease: T12545
Showing
- .gitignore 0 additions, 1 deletion.gitignore
- compiler/GHC/Builtin/bytearray-ops.txt.pp 12 additions, 12 deletionscompiler/GHC/Builtin/bytearray-ops.txt.pp
- compiler/GHC/Builtin/primops.txt.pp 36 additions, 80 deletionscompiler/GHC/Builtin/primops.txt.pp
- compiler/ghc.cabal.in 0 additions, 5 deletionscompiler/ghc.cabal.in
- configure.ac 0 additions, 1 deletionconfigure.ac
- libraries/base/GHC/Conc/Sync.hs 6 additions, 0 deletionslibraries/base/GHC/Conc/Sync.hs
- libraries/base/GHC/Int.hs 7 additions, 3 deletionslibraries/base/GHC/Int.hs
- libraries/base/GHC/Storable.hs 17 additions, 0 deletionslibraries/base/GHC/Storable.hs
- libraries/base/GHC/Word.hs 6 additions, 16 deletionslibraries/base/GHC/Word.hs
- libraries/ghc-bignum/src/GHC/Num/BigNat.hs 10 additions, 0 deletionslibraries/ghc-bignum/src/GHC/Num/BigNat.hs
- libraries/ghc-bignum/src/GHC/Num/Integer.hs 7 additions, 17 deletionslibraries/ghc-bignum/src/GHC/Num/Integer.hs
- testsuite/tests/codeGen/should_run/T9340.hs 8 additions, 0 deletionstestsuite/tests/codeGen/should_run/T9340.hs
- testsuite/tests/codeGen/should_run/cgrun072.hs 4 additions, 0 deletionstestsuite/tests/codeGen/should_run/cgrun072.hs
- testsuite/tests/codeGen/should_run/cgrun075.hs 4 additions, 0 deletionstestsuite/tests/codeGen/should_run/cgrun075.hs
- testsuite/tests/codeGen/should_run/cgrun076.hs 4 additions, 0 deletionstestsuite/tests/codeGen/should_run/cgrun076.hs
- testsuite/tests/concurrent/should_run/AtomicPrimops.hs 17 additions, 0 deletionstestsuite/tests/concurrent/should_run/AtomicPrimops.hs
- testsuite/tests/primops/should_run/T4442.hs 16 additions, 0 deletionstestsuite/tests/primops/should_run/T4442.hs
Loading
Please register or sign in to comment