[Git][ghc/ghc][wip/int64-everywhere] 15 commits: rts: Flush eventlog buffers from flushEventLog

John Ericson gitlab at gitlab.haskell.org
Wed Nov 25 21:38:24 UTC 2020



John Ericson pushed to branch wip/int64-everywhere at Glasgow Haskell Compiler / GHC


Commits:
f88f4339 by Ben Gamari at 2020-11-24T02:43:20-05:00
rts: Flush eventlog buffers from flushEventLog

As noted in #18043, flushTrace failed flush anything beyond the writer.
This means that a significant amount of data sitting in capability-local
event buffers may never get flushed, despite the users' pleads for us to
flush.

Fix this by making flushEventLog flush all of the event buffers before
flushing the writer.

Fixes #18043.

- - - - -
7c03cc50 by Ben Gamari at 2020-11-24T02:43:55-05:00
gitlab-ci: Run LLVM job on appropriately-labelled MRs

Namely, those marked with the ~"LLVM backend" label

- - - - -
9b95d815 by Ben Gamari at 2020-11-24T02:43:55-05:00
gitlab-ci: Run LLVM builds on Debian 10

The current Debian 9 image doesn't provide LLVM 7.

- - - - -
2ed3e6c0 by Ben Gamari at 2020-11-24T02:43:55-05:00
CmmToLlvm: Declare signature for memcmp

Otherwise `opt` fails with:

    error: use of undefined value '@memcmp$def'

- - - - -
c4958d33 by Moritz Angermann at 2020-11-25T12:08:44-05:00
[Sized Cmm] properly retain sizes.

This replaces all Word<N> = W<N># Word# and Int<N> = I<N># Int#  with
Word<N> = W<N># Word<N># and Int<N> = I<N># Int<N>#, thus providing us
with properly sized primitives in the codegenerator instead of pretending
they are all full machine words.

This came up when implementing darwinpcs for arm64.  The darwinpcs reqires
us to pack function argugments in excess of registers on the stack.  While
most procedure call standards (pcs) assume arguments are just passed in
8 byte slots; and thus the caller does not know the exact signature to make
the call, darwinpcs requires us to adhere to the prototype, and thus have
the correct sizes.  If we specify CInt in the FFI call, it should correspond
to the C int, and not just be Word sized, when it's only half the size.

This does change the expected output of T16402 but the new result is no
less correct as it eliminates the narrowing (instead of the `and` as was
previously done).

Bumps the array, bytestring, text, and binary submodules.

Co-Authored-By: Ben Gamari <ben at well-typed.com>

Metric Increase:
    T13701
    T14697

- - - - -
24e0ea5e by John Ericson at 2020-11-25T13:38:35-05:00
Make primop handler indentation more consistent

- - - - -
cd935e98 by John Ericson at 2020-11-25T14:21:52-05:00
Cleanup some primop-related identifers

 - Don't use "extend" or "narrow" in some of the user-facing primops
   names for conversions.

     - Names like `narrowInt32#` are misleading when `Int` is 32-bits.

     - Names like `extendInt64#` are flat-out wrong when `Int is
       32-bits.

     - `narrow{Int,Word}<N>#` however map a type to itself, and so don't
       suffer from this problem. They are left as-is.

 - Harmonize the internal (big sum type) names of the native vs
   fixed-sized number primops a bit. (Mainly by renaming the former.)

- - - - -
9ffabc57 by Sylvain Henry at 2020-11-25T14:38:43-05:00
Make proper fixed-with number literals

(Progress towards #11953, #17377, #17375)

Besides being nicer to use, this also will allow for better constant
folding for the fixed-width types, on par with what `Int#` and `Word#`
have today.

- - - - -
879d4151 by John Ericson at 2020-11-25T20:41:26+00:00
Merge branch 'wip/fix-64-toArgRep' into HEAD

- - - - -
8a78e01f by John Ericson at 2020-11-25T21:27:05+00:00
Make fixed-size `Int32#` and `Int64#`

The boxed Int64 uses Int64#, but Int32# still uses Int#. The 32-bit case
is less pressing to change because it is not a source of brittle
CPP---it is the same thing on all platforms.

We need Int64/Word64 constant folding to avoid the let/app restriction on Core, so
that is implemented now. 32-bit constant unfolding and 32-bit literals
are left as follow-up.

This is the bulk of #11953

Co-authored-by: Sylvain Henry <hsyl20 at gmail.com>

- - - - -
15882d21 by John Ericson at 2020-11-25T21:27:06+00:00
Inline INT64 and WORD64 macros in primops.txt.pp

The definition is now unconditional so there is no reason for that CPP.

- - - - -
a6c6ed4c by Sylvain Henry at 2020-11-25T21:37:46+00:00
Adapt rules from #16402 to Word64#/Int64#

- - - - -
6cfc5461 by John Ericson at 2020-11-25T21:37:48+00:00
Copy enumFrom* implementations from Int/Word for Int64/Word64

Without this, we don't get proper list fusion.

I think this sort of copying is OK for now, but we absolutely need
something better if we are going to make `IntN` use `IntN#` for all `N`.
The degree to which proper metaprogramming has been punted upon by
factoring everything through the native-sized types is disconcerting.

- - - - -
5b32b6e2 by John Ericson at 2020-11-25T21:37:48+00:00
`integerFromInt64#` can be inlined when the word size is >= 64 bits

Maybe this will help with the renaming test failure?

- - - - -
4a714538 by John Ericson at 2020-11-25T21:37:48+00:00
Add builtin rule for `divInt64#` and `modInt64#`

- - - - -


30 changed files:

- .gitlab-ci.yml
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/Builtin/bytearray-ops.txt.pp
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/Cmm.hs
- compiler/GHC/Cmm/Expr.hs
- compiler/GHC/Cmm/MachOp.hs
- compiler/GHC/CmmToAsm/PPC/CodeGen.hs
- compiler/GHC/CmmToAsm/Ppr.hs
- compiler/GHC/CmmToAsm/SPARC/CodeGen.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/CmmToC.hs
- compiler/GHC/CmmToLlvm/Base.hs
- compiler/GHC/CmmToLlvm/CodeGen.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/CoreToByteCode.hs
- compiler/GHC/HsToCore/Foreign/Call.hs
- compiler/GHC/HsToCore/Foreign/Decl.hs
- compiler/GHC/HsToCore/Match/Literal.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Iface/Tidy/StaticPtrTable.hs
- compiler/GHC/Platform.hs
- compiler/GHC/Runtime/Heap/Inspect.hs
- compiler/GHC/StgToCmm/DataCon.hs
- compiler/GHC/StgToCmm/Prim.hs
- compiler/GHC/StgToCmm/Utils.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7e057ab98551b7f49e0d336700c3312a74f90610...4a7145381124af853815639a48b752b9ac995d2a

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7e057ab98551b7f49e0d336700c3312a74f90610...4a7145381124af853815639a48b752b9ac995d2a
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/20201125/4751c762/attachment.html>


More information about the ghc-commits mailing list