[Git][ghc/ghc][wip/T18854] 28 commits: Remove Proxy# argument in Data.Typeable.Internal

Ben Gamari gitlab at gitlab.haskell.org
Mon Oct 19 15:05:50 UTC 2020



Ben Gamari pushed to branch wip/T18854 at Glasgow Haskell Compiler / GHC


Commits:
51c4b851 by Krzysztof Gogolewski at 2020-10-15T04:30:27-04:00
Remove Proxy# argument in Data.Typeable.Internal

No longer neccessary - TypeRep is now indexed, there is no ambiguity.

Also fix a comment in Evidence.hs, IsLabel no longer takes a Proxy#.

- - - - -
809f09e8 by Sylvain Henry at 2020-10-15T04:31:07-04:00
Fix parsing of PIE flags

-fPIE and -fno-PIE flags were (un)setting Opt_PIC instead of Opt_PIE.

Original commit: 3625728a0e3a9b56c2b85ae7ea8bcabdd83ece6a

- - - - -
3d7db148 by Ben Gamari at 2020-10-15T04:31:42-04:00
testsuite: Add missing #include on <stdlib.h>

This otherwise fails on newer Clangs, which warn
more aggressively on undeclared symbols.
- - - - -
998803dc by Andrzej Rybczak at 2020-10-15T11:40:32+02:00
Add flags for annotating Generic{,1} methods INLINE[1] (#11068)

Makes it possible for GHC to optimize away intermediate Generic representation
for more types.

Metric Increase:
    T12227

- - - - -
6b14c418 by GHC GitLab CI at 2020-10-15T21:57:50-04:00
Extend mAX_TUPLE_SIZE to 64

As well a ctuples and sums.

- - - - -
d495f36a by Ben Gamari at 2020-10-15T21:58:27-04:00
rts: Clean-up whitespace in Interpreter

- - - - -
cf10becd by Ben Gamari at 2020-10-15T21:58:27-04:00
compiler/ByteCode: Use strict Maps in bytecode assembler

- - - - -
ae146b53 by Ben Gamari at 2020-10-15T21:58:27-04:00
compiler/ByteCode: Make LocalLabel a newtype

- - - - -
cc536288 by Ben Gamari at 2020-10-15T21:58:27-04:00
compiler/ByteCode: Allow 2^32 local labels

This widens LocalLabel to 2^16, avoiding the crash observed in #14334.

Closes #14334.

- - - - -
1bb0512f by Ben Gamari at 2020-10-16T00:15:31-04:00
mingw: Extract zst toolchain archives

This should have been done when the toolchain was bumped.

- - - - -
bf7c5b6d by Ben Gamari at 2020-10-16T00:15:31-04:00
base: Reintroduce necessary LANGUAGE pragmas

These were incorrectly removed in a recent cleanup commit.

- - - - -
c6b4be4b by Ben Gamari at 2020-10-16T00:15:31-04:00
testsuite: Sort metrics by metric type

Closes #18838.

- - - - -
c7989c93 by Ben Gamari at 2020-10-16T00:15:31-04:00
testsuite: Account for -Wnoncanonical-monoid-instances changes on Windows

- - - - -
330a5433 by Ben Gamari at 2020-10-16T00:15:31-04:00
rts: Add __mingw_vfprintf to RtsSymbols.c

Following the model of the other printf symbols. See Note [Symbols for
MinGW's printf].

- - - - -
c4a69f37 by Ben Gamari at 2020-10-16T00:15:31-04:00
gitlab-ci: Remove allow_failure from Windows jobs

- - - - -
9a9679db by Ben Gamari at 2020-10-16T00:15:31-04:00
gitlab-ci: Fix Hadrian bindist names

- - - - -
07b0db86 by f-a at 2020-10-16T10:14:39-04:00
Clarify Eq documentation #18713
- - - - -
aca0e63b by Ben Gamari at 2020-10-17T10:20:31-04:00
gitlab-ci: Allow doc-tarball job to fail

Currently the Hadrian build appears not to package documentation correctly,
causing doc-tarball to fail due to the Windows build.
- - - - -
b02a9ea7 by Ben Gamari at 2020-10-17T13:26:24-04:00
gitlab-ci: s/allow_newer/allow_failure

Silly mistake on my part.
- - - - -
59d7c9f4 by John Ericson at 2020-10-17T22:01:38-04:00
Skip type family defaults with hs-boot and hsig files

Works around #17190, possible resolution for #17224. New design is is
according to accepted [GHC Propoal 320].

Instances in signatures currently unconditionally opt into associated
family defaults if no explicit instance is given. This is bad for two
reasons:

  1. It constrains possible instantiations to use the default, rather
  than possibly define the associated family differently.

  2. It breaks compilation as type families are unsupported in
  signatures.

This PR simply turns off the filling in of defaults in those cases.
Additionally, it squelches a missing definition warning for hs-boot too
that was only squelched for hsig before.

The downsides are:

  1. There is no way to opt into the default, other than copying its
  definition.

  2. If we fixed type classes in signatures, and wanted instances to
  have to explicitly *out of* rather than into the default, that would
  now be a breaking change.

The change that is most unambiguously goood is harmonizing the warning
squelching between hs-boot or hsig. Maybe they should have the warning
(opt out of default) maybe they shouldn't (opt in to default), but
surely it should be the same for both.

Add hs-boot version of a backpack test regarding class-specified
defaults in instances that appear in an hs-boot file.

The metrics increase is very slight and makes no sense --- at least no
one has figured anything out after this languishing for a while, so I'm
just going to accept it.

Metric Increase:
  T10421a

[GHC proposal 320]: https://github.com/ghc-proposals/ghc-proposals/pull/320

- - - - -
7eb46a09 by Sebastian Graf at 2020-10-17T22:02:13-04:00
Arity: Refactor fixed-point iteration in GHC.Core.Opt.Arity

Arity analysis used to propagate optimistic arity types during
fixed-point interation through the `ArityEnv`'s `ae_cheap_fun` field,
which is like `GHC.Core.Utils.exprIsCheap`, but also considers the
current iteration's optimistic arity, for the binder in question only.

In #18793, we have seen that this is a problematic design, because it
doesn't allow us to look through PAP bindings of that binder.

Hence this patch refactors to a more traditional form with an explicit
signature environment, in which we record the optimistic `ArityType` of
the binder in question (and at the moment is the *only* binder that is
recorded in the arity environment).

- - - - -
6b3eb06a by Sebastian Graf at 2020-10-17T22:02:13-04:00
Arity: Record arity types for non-recursive lets

In #18793, we saw a compelling example which requires us to look at
non-recursive let-bindings during arity analysis and unleash their arity
types at use sites.

After the refactoring in the previous patch, the needed change is quite
simple and very local to `arityType`'s defn for non-recurisve `Let`.

Apart from that, we had to get rid of the second item of
`Note [Dealing with bottoms]`, which was entirely a safety measure and
hindered optimistic fixed-point iteration.

Fixes #18793.

The following metric increases are all caused by this commit and a
result of the fact that we just do more work now:

Metric Increase:
    T3294
    T12545
    T12707

- - - - -
451455fd by Sebastian Graf at 2020-10-17T22:02:13-04:00
Testsuite: Add dead arity analysis tests

We didn't seem to test these old tests at all, judging from their
expected output.

- - - - -
50e9df49 by Dylan Yudaken at 2020-10-17T22:02:50-04:00
When using rts_setInCallCapability, lock incall threads

This diff makes sure that incall threads, when using `rts_setInCallCapability`, will be created as locked.
If the thread is not locked, the thread might end up being scheduled to a different capability.
While this is mentioned in the docs for `rts_setInCallCapability,`, it makes the method significantly less useful as there is no guarantees on the capability being used.

This commit also adds a test to make sure things stay on the correct capability.

- - - - -
0b995759 by DylanZA at 2020-10-17T22:02:50-04:00
Apply suggestion to testsuite/tests/ffi/should_run/all.T
- - - - -
a91dcb66 by Sylvain Henry at 2020-10-17T22:04:02-04:00
Don't get host RTS ways via settings (#18651)

To correctly perform a linking hack for Windows we need to link with the
RTS GHC is currently using. We used to query the RTS ways via the
"settings" file but it is fragile (#18651). The hack hasn't been fixed
to take into account all the ways (Tracing) and it makes linking of GHC
with another RTS more difficult (we need to link with another RTS and to
regenerate the settings file).

So this patch uses the ways reported by the RTS itself
(GHC.Platform.Ways.hostWays) instead of the "settings" file.

- - - - -
d858a3ae by Hécate at 2020-10-17T22:04:38-04:00
Linting corrections

* Bring back LANGUAGE pragmas in GHC.IO.Handle.Lock.Windows
* Exclude some modules that are wrongfully reported

- - - - -
e898118a by Ben Gamari at 2020-10-19T11:05:45-04:00
Document that ccall convention doesn't support varargs

We do not support foreign "C" imports of varargs functions. While this
works on amd64, in general the platform's calling convention may need
more type information that our Cmm representation can currently provide.
For instance, this is the case with Darwin's AArch64 calling convention.
Document this fact in the users guide and fix T5423 which makes use of a
disallowed foreign import.

Closes #18854.

- - - - -


30 changed files:

- .gitlab-ci.yml
- .gitlab/ci.sh
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/Instr.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/CoreToByteCode.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Foreign/Decl.hs
- compiler/GHC/Platform.hs
- compiler/GHC/Settings.hs
- compiler/GHC/Settings/Constants.hs
- compiler/GHC/Settings/IO.hs
- compiler/GHC/SysTools.hs
- compiler/GHC/Tc/Deriv.hs
- compiler/GHC/Tc/Deriv/Generics.hs
- compiler/GHC/Tc/Deriv/Utils.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Instance/Class.hs
- compiler/GHC/Tc/TyCl/Class.hs
- compiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/Tc/Types/Evidence.hs
- configure.ac
- docs/users_guide/9.2.1-notes.rst
- docs/users_guide/exts/ffi.rst
- docs/users_guide/using-optimisation.rst
- hadrian/src/Rules/Generate.hs
- includes/RtsAPI.h


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7c9b13ee70835352d6cf808aad8ef5efbdc7e2ec...e898118a90ab68dc9388d9643d282e8f0ebcbb0b

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7c9b13ee70835352d6cf808aad8ef5efbdc7e2ec...e898118a90ab68dc9388d9643d282e8f0ebcbb0b
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/20201019/6879a641/attachment-0001.html>


More information about the ghc-commits mailing list