[Git][ghc/ghc][wip/nested-cpr-2019] 67 commits: Document profiling flags, warning flags, and no-pie

Sebastian Graf gitlab at gitlab.haskell.org
Mon Oct 12 09:31:44 UTC 2020



Sebastian Graf pushed to branch wip/nested-cpr-2019 at Glasgow Haskell Compiler / GHC


Commits:
5fc4243b by Rachel at 2020-10-07T14:59:45-04:00
Document profiling flags, warning flags, and no-pie

- - - - -
b41f7c38 by Andreas Klebinger at 2020-10-07T15:00:20-04:00
WinIO: Small changes related to atomic request swaps.

Move the atomix exchange over the Ptr type to an internal module.

Fix a bug caused by us passing ptr-to-ptr instead of ptr to
atomic exchange.

Renamed interlockedExchange to exchangePtr.

I've also added an cas primitive. It turned out we don't need it
for WinIO but I'm leaving it in as it's useful for other things.

- - - - -
948a14e1 by Ben Gamari at 2020-10-07T15:00:55-04:00
gitlab-ci: Fix name of Ubuntu 20.04 image
- - - - -
74d4017b by Sylvain Henry at 2020-10-07T15:01:35-04:00
Fix -flink-rts (#18651)

Before this patch -flink-rts could link with GHC's rts instead of the
selected one.

- - - - -
0e8b923d by Sylvain Henry at 2020-10-07T15:01:35-04:00
Apply suggestion to compiler/GHC/SysTools.hs
- - - - -
d6dff830 by Alan Zimmerman at 2020-10-07T15:02:10-04:00
Preserve as-parsed arrow type for HsUnrestrictedArrow

When linear types are disabled, HsUnrestrictedArrow is treated as
HslinearArrow.

Move this adjustment into the type checking phase, so that the parsed
source accurately represents the source as parsed.

Closes #18791

- - - - -
030c5ce0 by Karel Gardas at 2020-10-07T15:02:48-04:00
hadrian: use stage0 linker to merge objects when done during the stage0

Fixes #18800.

- - - - -
a94db588 by Ben Gamari at 2020-10-07T15:03:23-04:00
testsuite: Allow whitespace before "Metric (in|de)crease"

Several people have struggled with metric change annotations
in their commit messages not being recognized due to the fact that
GitLab's job log inserts a space at the beginning of each line. Teach
the regular expression to accept this whitespace.

- - - - -
e91ddddd by Krzysztof Gogolewski at 2020-10-07T15:04:07-04:00
Misc cleanup

* Include funTyCon in exposedPrimTyCons.
  Every single place using exposedPrimTyCons was adding funTyCon
  manually.
* Remove unused synTyConResKind and ieLWrappedName
* Add recordSelectorTyCon_maybe
* In exprType, panic instead of giving a trace message and dummy output.
  This prevents #18767 reoccurring.
* Fix compilation error in fragile concprog001 test (part of #18732)

- - - - -
386c2d7f by Sylvain Henry at 2020-10-09T08:40:33-04:00
Use UnitId in the backend instead of Unit

In Cmm we can only have real units identified with an UnitId.  Other
units (on-the-fly instantiated units and holes) are only used in
type-checking backpack sessions that don't produce Cmm.

- - - - -
a566c83d by Simon Jakobi at 2020-10-09T08:41:09-04:00
Update containers to v0.6.4.1

Updates containers submodule.

- - - - -
fd984d68 by Tamar Christina at 2020-10-09T08:41:50-04:00
rts: fix race condition in StgCRun

On windows the stack has to be allocated 4k at a time, otherwise we get
a segfault. This is done by using a helper ___chkstk_ms that is provided
by libgcc. The Haskell side already knows how to handle this but we need
to do the same from STG. Previously we would drop the stack in StgRun
but would only make it valid whenever the scheduler loop ran.

This approach was fundamentally broken in that it falls apart when you
take a signal from the OS. We see it less often because you initially
get allocated a 1MB stack block which you have to blow past first.

Concretely this means we must always keep the stack valid.

Fixes #18601.

- - - - -
accdb24a by Sylvain Henry at 2020-10-09T08:42:31-04:00
Expose RTS-only ways (#18651)

Some RTS ways are exposed via settings (ghcThreaded, ghcDebugged) but
not all. It's simpler if the RTS exposes them all itself.

- - - - -
d360f343 by MaxGabriel at 2020-10-09T08:43:11-04:00
Document -Wderiving-typeable

Tracking: #18641

- - - - -
e48cab2a by Krzysztof Gogolewski at 2020-10-09T08:43:49-04:00
Add a flag to indicate that gcc supports -no-pie

Fixes #17919.

- - - - -
f7e2fff9 by Hécate at 2020-10-09T08:44:26-04:00
Add linting of `base` to the CI

- - - - -
45a1d493 by Andreas Klebinger at 2020-10-09T08:45:05-04:00
Use proper RTS flags when collecting residency in perf tests.

Replace options like collect_stats(['peak_megabytes_allocated'],4) with
collect_runtime_residency(4) and so forth. Reason being that the later
also supplies some default RTS arguments which make sure residency does
not fluctuate too much.

The new flags mean we get new (hopefully more accurate) baselines so
accept the stat changes.

-------------------------
Metric Decrease:
     T4029
     T4334
     T7850
Metric Increase:
     T13218
     T7436
-------------------------

- - - - -
ef65b154 by Andreas Klebinger at 2020-10-09T08:45:42-04:00
testsuite/timeout: Fix windows specific errors.

We now seem to use -Werror there. Which caused some long standing
warnings to become errors.

I applied changes to remove the warnings allowing the testsuite to
run on windows as well.

- - - - -
e691a5a0 by Sylvain Henry at 2020-10-09T08:46:22-04:00
Hadrian: add quick-debug flavour

- - - - -
12191a99 by Sylvain Henry at 2020-10-09T08:47:00-04:00
Bignum: match on small Integer/Natural

Previously we only matched on *variables* whose unfoldings were a ConApp
of the form `IS lit#` or `NS lit##`. But we forgot to match on the
ConApp directly... As a consequence, constant folding only worked after
the FloatOut pass which creates bindings for most sub-expressions. With
this patch, matching on bignums works even with -O0 (see bignumMatch
test).

- - - - -
36787bba by Alan Zimmerman at 2020-10-09T08:47:36-04:00
ApiAnnotations : preserve parens in GADTs

A cleanup in 7f418acf61e accidentally discarded some parens in
ConDeclGADT.

Make sure these stay in the AST in a usable format.

Also ensure the AnnLolly does not get lost in a GADT.

- - - - -
32dc7698 by Krzysztof Gogolewski at 2020-10-09T08:48:15-04:00
Linear types: fix roles in GADTs (#18799)

- - - - -
9657f6f3 by Ben Gamari at 2020-10-09T08:48:52-04:00
sdist: Include hadrian sources in source distribution

Previously the make build system's source distribution rules neglected
to include Hadrian's sources.

Fixes #18794.

- - - - -
c832f7e2 by Tamar Christina at 2020-10-09T08:49:33-04:00
winio: fixed timeouts non-threaded.

- - - - -
6f0243ae by Tamar Christina at 2020-10-09T08:50:13-04:00
winio: fix array splat

- - - - -
0fd3d360 by Tamar Christina at 2020-10-09T08:50:51-04:00
winio: fixed bytestring reading interface.

- - - - -
dfaef1ca by Tamar Christina at 2020-10-09T08:51:30-04:00
winio: fixed more data error.

- - - - -
bfdccac6 by Simon Peyton Jones at 2020-10-09T08:52:07-04:00
Fix desugaring of record updates on data families

This fixes a long-standing bug in the desugaring of record
updates for data families, when the latter involves a GADT. It's
all explained in Note [Update for GADTs] in GHC.HsToCore.Expr.

Building the correct cast is surprisingly tricky, as that Note
explains.

Fixes #18809.  The test case (in indexed-types/should_compile/T18809)
contains several examples that exercise the dark corners.

- - - - -
e5c7c9c8 by Ben Gamari at 2020-10-09T08:52:43-04:00
Bump win32-tarballs version to 0.3

This should fix #18774.

- - - - -
ef950b19 by Andreas Klebinger at 2020-10-09T08:53:21-04:00
Add TyCon Set/Env and use them in a few places.

Firstly this improves code clarity.

But it also has performance benefits as we no longer
go through the name of the TyCon to get at it's unique.

In order to make this work the recursion check for TyCon
has been moved into it's own module in order to avoid import
cycles.

- - - - -
fd302e93 by Krzysztof Gogolewski at 2020-10-09T08:54:02-04:00
Add -pgmlm and -optlm flags

!3798 added documentation and semantics for the flags,
but not parsing.

- - - - -
db236ffc by Sylvain Henry at 2020-10-09T08:54:41-04:00
Testsuite: increase timeout for T18223 (#18795)

- - - - -
6a243e9d by Sylvain Henry at 2020-10-09T08:55:21-04:00
Cache HomeUnit in HscEnv (#17957)

Instead of recreating the HomeUnit from the DynFlags every time we need
it, we store it in the HscEnv.

- - - - -
5884fd32 by Fendor at 2020-10-09T19:46:28+02:00
Move File Target parser to library #18596

- - - - -
ea59fd4d by Hécate at 2020-10-10T14:49:59-04:00
Lint the compiler for extraneous LANGUAGE pragmas

- - - - -
22f218b7 by Krzysztof Gogolewski at 2020-10-10T14:50:42-04:00
Linear types: fix quantification in GADTs (#18790)

- - - - -
74ee1237 by Sylvain Henry at 2020-10-10T14:51:20-04:00
Bignum: fix bigNatCompareWord# bug (#18813)

- - - - -
274e21f0 by Hécate at 2020-10-11T10:55:56+02:00
Remove the dependency on the ghc-linters stage

- - - - -
24cb85f2 by Sebastian Graf at 2020-10-12T11:31:25+02:00
Nested CPR

- - - - -
bdcf72b4 by Sebastian Graf at 2020-10-12T11:31:25+02:00
Move tests from stranal to cpranal

- - - - -
c426cac6 by Sebastian Graf at 2020-10-12T11:31:25+02:00
Accept FacState

- - - - -
498e2c5d by Sebastian Graf at 2020-10-12T11:31:25+02:00
Factor Cpr and Termination into a joint lattice

As a result, we don't even have to export Termination from Cpr. Neat!

Also I realised there is a simpler and more sound way to generate and
unleash CPR signatures.

- - - - -
7b3d0659 by Sebastian Graf at 2020-10-12T11:31:25+02:00
Consider unboxing effects of WW better and get rid of hack

- - - - -
a257ddb9 by Sebastian Graf at 2020-10-12T11:31:25+02:00
stuff

- - - - -
38274602 by Sebastian Graf at 2020-10-12T11:31:25+02:00
A slew of testsuite changes

- - - - -
bdff7f5f by Sebastian Graf at 2020-10-12T11:31:25+02:00
Fix T1600

- - - - -
7ffaa2f7 by Sebastian Graf at 2020-10-12T11:31:25+02:00
Fix primop termination

- - - - -
78812c04 by Sebastian Graf at 2020-10-12T11:31:25+02:00
Test for DataCon wrapper CPR

- - - - -
eb0825e6 by Sebastian Graf at 2020-10-12T11:31:25+02:00
Fix CPR of bottoming functions/primops

- - - - -
0c4eba89 by Sebastian Graf at 2020-10-12T11:31:25+02:00
Fix DataConWrapperCpr and accept other test outputs

- - - - -
38524a86 by Sebastian Graf at 2020-10-12T11:31:25+02:00
Accept two more changed test outputs

- - - - -
ded5e1d1 by Sebastian Graf at 2020-10-12T11:31:25+02:00
Update CaseBinderCPR with a new function

- - - - -
91e3a5ee by Sebastian Graf at 2020-10-12T11:31:25+02:00
Don't give the case binder the CPR property

- - - - -
6442476b by Sebastian Graf at 2020-10-12T11:31:25+02:00
Prune CPR sigs to constant depth on all bindings

- - - - -
67a6c915 by Sebastian Graf at 2020-10-12T11:31:25+02:00
Use variable length coding for ConTags

- - - - -
1ce97e48 by Sebastian Graf at 2020-10-12T11:31:25+02:00
Accept testuite output

- - - - -
4a5529dd by Sebastian Graf at 2020-10-12T11:31:25+02:00
Don't attach CPR sigs to expandable bindings; transform their unfoldings instead

- - - - -
55e05e29 by Sebastian Graf at 2020-10-12T11:31:25+02:00
Revert "Don't give the case binder the CPR property"

This reverts commit 910edd76d5fe68b58c74f3805112f9faef4f2788.

It seems we broke too much with this change. We lost our big win in
`fish`.

- - - - -
2a8f3523 by Sebastian Graf at 2020-10-12T11:31:25+02:00
A more modular and configurable approach to optimistic case binder CPR

- - - - -
bbf00ae6 by Sebastian Graf at 2020-10-12T11:31:25+02:00
Fix T9291

- - - - -
ae2391be by Sebastian Graf at 2020-10-12T11:31:26+02:00
Document -fcase-binder-cpr-depth in the user's guide

- - - - -
3f1cda97 by Sebastian Graf at 2020-10-12T11:31:26+02:00
Testsuite changes

- - - - -
05f052a8 by Sebastian Graf at 2020-10-12T11:31:26+02:00
Refactoring around cprAnalBind

- - - - -
a232e975 by Sebastian Graf at 2020-10-12T11:31:26+02:00
Fix case binder CPR by not looking into unfoldings of case binders

- - - - -
5d6cbb4a by Sebastian Graf at 2020-10-12T11:31:26+02:00
Fix T16893

- - - - -
2dcfa20f by Sebastian Graf at 2020-10-12T11:31:26+02:00
Accept new test output for T17673

- - - - -
f3c50c90 by Sebastian Graf at 2020-10-12T11:31:26+02:00
Accepting metric changes to advance CI

There are two ghc/alloc increases, which we might want to investigate
later on.

Metric Decrease:
    T1969
    T9233
    T9872a
    T9872b
    T9872c
    T9872d
    T12425
Metric Increase:
    T13253
    T13701
    T15164
Metric Increase ['max_bytes_used'] (test_env='x86_64-darwin'):
    T9675

- - - - -


30 changed files:

- .gitlab-ci.yml
- + compiler/.hlint.yaml
- compiler/GHC.hs
- compiler/GHC/Builtin/Types/Prim.hs
- compiler/GHC/Builtin/Utils.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/InfoTable.hs
- compiler/GHC/ByteCode/Instr.hs
- compiler/GHC/ByteCode/Linker.hs
- compiler/GHC/ByteCode/Types.hs
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Cmm/Dataflow/Collections.hs
- compiler/GHC/Cmm/Dataflow/Label.hs
- compiler/GHC/Cmm/Node.hs
- compiler/GHC/Cmm/Pipeline.hs
- compiler/GHC/CmmToAsm/BlockLayout.hs
- compiler/GHC/CmmToAsm/CFG.hs
- compiler/GHC/CmmToAsm/Reg/Graph/SpillCost.hs
- compiler/GHC/CmmToAsm/Reg/Linear/PPC.hs
- compiler/GHC/CmmToAsm/Reg/Linear/SPARC.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/CmmToAsm/X86/Instr.hs
- compiler/GHC/CmmToC.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Coercion/Axiom.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/FamInstEnv.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Make.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6716c5fa3f566fcce2ac17c99bfc7c628c08e0f0...f3c50c901b6d6fedd4ad469aca743aff69f364f5

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6716c5fa3f566fcce2ac17c99bfc7c628c08e0f0...f3c50c901b6d6fedd4ad469aca743aff69f364f5
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/20201012/833e2354/attachment-0001.html>


More information about the ghc-commits mailing list