[Git][ghc/ghc][wip/hadrian-cross-stage2] 65 commits: testsuite: mark jspace as fragile on i386.
Matthew Pickering (@mpickering)
gitlab at gitlab.haskell.org
Wed Jan 17 16:27:56 UTC 2024
Matthew Pickering pushed to branch wip/hadrian-cross-stage2 at Glasgow Haskell Compiler / GHC
Commits:
0038d052 by Zubin Duggal at 2023-12-22T23:28:00-05:00
testsuite: mark jspace as fragile on i386.
This test has been flaky for some time and has been failing consistently on
i386-linux since 8e0446df landed.
See #24261
- - - - -
dfd670a0 by Ben Bellick at 2023-12-24T10:10:31-05:00
Deprecate -ddump-json and introduce -fdiagnostics-as-json
Addresses #19278
This commit deprecates the underspecified -ddump-json flag and
introduces a newer, well-specified flag -fdiagnostics-as-json.
Also included is a JSON schema as part of the documentation.
The -ddump-json flag will be slated for removal shortly after this merge.
- - - - -
609e6225 by Ben Bellick at 2023-12-24T10:10:31-05:00
Deprecate -ddump-json and introduce -fdiagnostics-as-json
Addresses #19278
This commit deprecates the underspecified -ddump-json flag and
introduces a newer, well-specified flag -fdiagnostics-as-json.
Also included is a JSON schema as part of the documentation.
The -ddump-json flag will be slated for removal shortly after this merge.
- - - - -
865513b2 by Ömer Sinan Ağacan at 2023-12-24T10:11:13-05:00
Fix BNF in user manual 6.6.8.2: formal syntax for instance declarations
- - - - -
c247b6be by Zubin Duggal at 2023-12-25T16:01:23-05:00
docs: document permissibility of -XOverloadedLabels (#24249)
Document the permissibility introduced by
https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0170-unrestricted-overloadedlabels.rst
- - - - -
e5b7eb59 by Ömer Sinan Ağacan at 2023-12-25T16:02:03-05:00
Fix a code block syntax in user manual sec. 6.8.8.6
- - - - -
2db11c08 by Ben Gamari at 2023-12-29T15:35:48-05:00
genSym: Reimplement via CAS on 32-bit platforms
Previously the remaining use of the C implementation on 32-bit platforms
resulted in a subtle bug, #24261. This was due to the C object (which
used the RTS's `atomic_inc64` macro) being compiled without `-threaded`
yet later being used in a threaded compiler.
Side-step this issue by using the pure Haskell `genSym` implementation on
all platforms. This required implementing `fetchAddWord64Addr#` in terms
of CAS on 64-bit platforms.
- - - - -
19328a8c by Xiaoyan Ren at 2023-12-29T15:36:30-05:00
Do not color the diagnostic code in error messages (#24172)
- - - - -
685b467c by Krzysztof Gogolewski at 2023-12-29T15:37:06-05:00
Enforce that bindings of implicit parameters are lifted
Fixes #24298
- - - - -
bc4d67b7 by Matthew Craven at 2023-12-31T06:15:42-05:00
StgToCmm: Detect some no-op case-continuations
...and generate no code for them. Fixes #24264.
- - - - -
5b603139 by Krzysztof Gogolewski at 2023-12-31T06:16:18-05:00
Revert "testsuite: mark jspace as fragile on i386."
This reverts commit 0038d052c8c80b4b430bb2aa1c66d5280be1aa95.
The atomicity bug should be fixed by !11802.
- - - - -
d55216ad by Krzysztof Gogolewski at 2024-01-01T12:05:49-05:00
Refactor: store [[PrimRep]] rather than [Type] in STG
StgConApp stored a list of types. This list was used exclusively
during unarisation of unboxed sums (mkUbxSum).
However, this is at a wrong level of abstraction:
STG shouldn't be concerned with Haskell types, only PrimReps.
Update the code to store a [[PrimRep]]. Also, there's no point in storing
this list when we're not dealing with an unboxed sum.
- - - - -
8b340bc7 by Ömer Sinan Ağacan at 2024-01-01T12:06:29-05:00
Kind signatures docs: mention that they're allowed in newtypes
- - - - -
989bf8e5 by Zubin Duggal at 2024-01-03T20:08:47-05:00
ci: Ensure we use the correct bindist name for the test artifact when generating
release ghcup metadata
Fixes #24268
- - - - -
89299a89 by Krzysztof Gogolewski at 2024-01-03T20:09:23-05:00
Refactor: remove calls to typePrimRepArgs
The function typePrimRepArgs is just a thin wrapper around
typePrimRep, adding a VoidRep if the list is empty.
However, in StgToByteCode, we were discarding that VoidRep anyway,
so there's no point in calling it.
- - - - -
c7be0c68 by mmzk1526 at 2024-01-03T20:10:07-05:00
Use "-V" for alex version check for better backward compatibility
Fixes #24302.
In recent versions of alex, "-v" is used for "--verbose" instead of "-version".
- - - - -
67dbcc0a by Krzysztof Gogolewski at 2024-01-05T02:07:18-05:00
Fix VoidRep handling in ghci debugger
'go' inside extractSubTerms was giving a bad result given a VoidRep,
attempting to round towards the next multiple of 0.
I don't understand much about the debugger but the code should be better
than it was.
Fixes #24306
- - - - -
90ea574e by Krzysztof Gogolewski at 2024-01-05T02:07:54-05:00
VoidRep-related refactor
* In GHC.StgToByteCode, replace bcIdPrimId with idPrimRep,
bcIdArgRep with idArgRep, atomPrimRep with stgArgRep1.
All of them were duplicates.
* In GHC.Stg.Unarise, we were converting a PrimRep to a Type and back to
PrimRep. Remove the calls to primRepToType and typePrimRep1 which cancel out.
* In GHC.STG.Lint, GHC.StgToCmm, GHC.Types.RepType we were filtering out
VoidRep from the result of typePrimRep. But typePrimRep never returns
VoidRep - remove the filtering.
- - - - -
eaf72479 by brian at 2024-01-06T23:03:09-05:00
Add unaligned Addr# primops
Implements CLC proposal #154:
https://github.com/haskell/core-libraries-committee/issues/154
* add unaligned addr primops
* add tests
* accept tests
* add documentation
* fix js primops
* uncomment in access ops
* use Word64 in tests
* apply suggestions
* remove extra file
* move docs
* remove random options
* use setByteArray# primop
* better naming
* update base-exports test
* add base-exports for other architectures
- - - - -
d471d445 by Krzysztof Gogolewski at 2024-01-06T23:03:47-05:00
Remove VoidRep from PrimRep, introduce PrimOrVoidRep
This introduces
data PrimOrVoidRep = VoidRep | NVRep PrimRep
changes typePrimRep1 to return PrimOrVoidRep, and adds a new function
typePrimRepU to be used when the argument is definitely non-void.
Details in Note [VoidRep] in GHC.Types.RepType.
Fixes #19520
- - - - -
48720a07 by Matthew Craven at 2024-01-08T18:57:36-05:00
Apply Note [Sensitivity to unique increment] to LargeRecord
- - - - -
9e2e180f by Sebastian Graf at 2024-01-08T18:58:13-05:00
Debugging: Add diffUFM for convenient diffing between UniqFMs
- - - - -
948f3e35 by Sebastian Graf at 2024-01-08T18:58:13-05:00
Rename Opt_D_dump_stranal to Opt_D_dump_dmdanal
... and Opt_D_dump_str_signatures to Opt_D_dump_dmd_signatures
- - - - -
4e217e3e by Sebastian Graf at 2024-01-08T18:58:13-05:00
Deprecate -ddump-stranal and -ddump-str-signatures
... and suggest -ddump-dmdanal and -ddump-dmd-signatures instead
- - - - -
6c613c90 by Sebastian Graf at 2024-01-08T18:58:13-05:00
Move testsuite/tests/stranal to testsuite/tests/dmdanal
A separate commit so that the rename is obvious to Git(Lab)
- - - - -
c929f02b by Sebastian Graf at 2024-01-08T18:58:13-05:00
CoreSubst: Stricten `substBndr` and `cloneBndr`
Doing so reduced allocations of `cloneBndr` by about 25%.
```
T9233(normal) ghc/alloc 672,488,656 663,083,216 -1.4% GOOD
T9675(optasm) ghc/alloc 423,029,256 415,812,200 -1.7%
geo. mean -0.1%
minimum -1.7%
maximum +0.1%
```
Metric Decrease:
T9233
- - - - -
e3ca78f3 by Krzysztof Gogolewski at 2024-01-10T17:35:59-05:00
Deprecate -Wsemigroup
This warning was used to prepare for Semigroup becoming a superclass
of Monoid, and for (<>) being exported from Prelude. This happened in
GHC 8.4 in 8ae263ceb3566 and feac0a3bc69fd3.
The leftover logic for (<>) has been removed in GHC 9.8, 4d29ecdfcc79.
Now the warning does nothing at all and can be deprecated.
- - - - -
08d14925 by amesgen at 2024-01-10T17:36:42-05:00
WASM metadata: use correct GHC version
- - - - -
7a808419 by Xiaoyan Ren at 2024-01-10T17:37:24-05:00
Allow SCC declarations in TH (#24081)
- - - - -
28827c51 by Xiaoyan Ren at 2024-01-10T17:37:24-05:00
Fix prettyprinting of SCC pragmas
- - - - -
ae9cc1a8 by Matthew Craven at 2024-01-10T17:38:01-05:00
Fix loopification in the presence of void arguments
This also removes Note [Void arguments in self-recursive tail calls],
which was just misleading. It's important to count void args both
in the function's arity and at the call site.
Fixes #24295.
- - - - -
b718b145 by Zubin Duggal at 2024-01-10T17:38:36-05:00
testsuite: Teach testsuite driver about c++ sources
- - - - -
09cb57ad by Zubin Duggal at 2024-01-10T17:38:36-05:00
driver: Set -DPROFILING when compiling C++ sources with profiling
Earlier, we used to pass all preprocessor flags to the c++ compiler.
This meant that -DPROFILING was passed to the c++ compiler because
it was a part of C++ flags
However, this was incorrect and the behaviour was changed in
8ff3134ed4aa323b0199ad683f72165e51a59ab6. See #21291.
But that commit exposed this bug where -DPROFILING was no longer being passed
when compiling c++ sources.
The fix is to explicitly include -DPROFILING in `opt_cxx` when profiling is
enabled to ensure we pass the correct options for the way to both C and C++
compilers
Fixes #24286
- - - - -
2cf9dd96 by Zubin Duggal at 2024-01-10T17:38:36-05:00
testsuite: rename objcpp -> objcxx
To avoid confusion with C Pre Processsor
- - - - -
af6932d6 by Simon Peyton Jones at 2024-01-10T17:39:12-05:00
Make TYPE and CONSTRAINT not-apart
Issue #24279 showed up a bug in the logic in GHC.Core.Unify.unify_ty
which is supposed to make TYPE and CONSTRAINT be not-apart.
Easily fixed.
- - - - -
4a39b5ff by Zubin Duggal at 2024-01-10T17:39:48-05:00
ci: Fix typo in mk_ghcup_metadata.py
There was a missing colon in the fix to #24268 in 989bf8e53c08eb22de716901b914b3607bc8dd08
- - - - -
13503451 by Zubin Duggal at 2024-01-10T17:40:24-05:00
release-ci: remove release-x86_64-linux-deb11-release+boot_nonmoving_gc job
There is no reason to have this release build or distribute this variation.
This configuration is for testing purposes only.
- - - - -
afca46a4 by Sebastian Graf at 2024-01-10T17:41:00-05:00
Parser: Add a Note detailing why we need happy's `error` to implement layout
- - - - -
eaf8a06d by Krzysztof Gogolewski at 2024-01-11T00:43:17+01:00
Turn -Wtype-equality-out-of-scope on by default
Also remove -Wnoncanonical-{monoid,monad}-instances from -Wcompat,
since they are enabled by default. Refresh wcompat-warnings/ test
with new -Wcompat warnings.
Part of #24267
Co-authored-by: sheaf <sam.derbyshire at gmail.com>
- - - - -
42bee5aa by Sebastian Graf at 2024-01-12T21:16:21-05:00
Arity: Require called *exactly once* for eta exp with -fpedantic-bottoms (#24296)
In #24296, we had a program in which we eta expanded away an error despite the
presence of `-fpedantic-bottoms`.
This was caused by turning called *at least once* lambdas into one-shot lambdas,
while with `-fpedantic-bottoms` it is only sound to eta expand over lambdas that
are called *exactly* once.
An example can be found in `Note [Combining arity type with demand info]`.
Fixes #24296.
- - - - -
7e95f738 by Andreas Klebinger at 2024-01-12T21:16:57-05:00
Aarch64: Enable -mfma by default.
Fixes #24311
- - - - -
e43788d0 by Jason Shipman at 2024-01-14T12:47:38-05:00
Add more instances for Compose: Fractional, RealFrac, Floating, RealFloat
CLC proposal #226 https://github.com/haskell/core-libraries-committee/issues/226
- - - - -
ae6d8cd2 by Sebastian Graf at 2024-01-14T12:48:15-05:00
Pmc: COMPLETE pragmas associated with Family TyCons should apply to representation TyCons as well (#24326)
Fixes #24326.
- - - - -
c5fc7304 by sheaf at 2024-01-15T14:15:29-05:00
Use lookupOccRn_maybe in TH.lookupName
When looking up a value, we want to be able to find both variables
and record fields. So we should not use the lookupSameOccRn_maybe
function, as we can't know ahead of time which record field namespace
a record field with the given textual name will belong to.
Fixes #24293
- - - - -
da908790 by Krzysztof Gogolewski at 2024-01-15T14:16:05-05:00
Make the build more strict on documentation errors
* Detect undefined labels. This can be tested by adding :ref:`nonexistent`
to a documentation rst file; attempting to build docs will fail.
Fixed the undefined label in `9.8.1-notes.rst`.
* Detect errors. While we have plenty of warnings, we can at least enforce
that Sphinx does not report errors.
Fixed the error in `required_type_arguments.rst`.
Unrelated change: I have documented that the `-dlint` enables
`-fcatch-nonexhaustive-cases`, as can be verified by checking
`enableDLint`.
- - - - -
5077416e by Javier Sagredo at 2024-01-16T15:40:06-05:00
Profiling: Adds an option to not start time profiling at startup
Using the functionality provided by
d89deeba47ce04a5198a71fa4cbc203fe2c90794, this patch creates a new rts
flag `--no-automatic-time-samples` which disables the time profiling
when starting a program. It is then expected that the user starts it
whenever it is needed.
Fixes #24337
- - - - -
5776008c by Matthew Pickering at 2024-01-16T15:40:42-05:00
eventlog: Fix off-by-one error in postIPE
We were missing the extra_comma from the calculation of the size of the
payload of postIPE. This was causing assertion failures when the event
would overflow the buffer by one byte, as ensureRoomForVariable event
would report there was enough space for `n` bytes but then we would
write `n + 1` bytes into the buffer.
Fixes #24287
- - - - -
66dc09b1 by Simon Peyton Jones at 2024-01-16T15:41:18-05:00
Improve SpecConstr (esp nofib/spectral/ansi)
This MR makes three improvements to SpecConstr: see #24282
* It fixes an outright (and recently-introduced) bug in `betterPat`, which
was wrongly forgetting to compare the lengths of the argument lists.
* It enhances ConVal to inclue a boolean for work-free-ness, so that the
envt can contain non-work-free constructor applications, so that we
can do more: see Note [ConVal work-free-ness]
* It rejigs `subsumePats` so that it doesn't reverse the list. This can
make a difference because, when patterns overlap, we arbitrarily pick
the first. There is no "right" way, but this retains the old
pre-subsumePats behaviour, thereby "fixing" the regression in #24282.
Nofib results
+========================================
| spectral/ansi -21.14%
| spectral/hartel/comp_lab_zift -0.12%
| spectral/hartel/parstof +0.09%
| spectral/last-piece -2.32%
| spectral/multiplier +6.03%
| spectral/para +0.60%
| spectral/simple -0.26%
+========================================
| geom mean -0.18%
+----------------------------------------
The regression in `multiplier` is sad, but it simply replicates GHC's
previous behaviour (e.g. GHC 9.6).
- - - - -
65da79b3 by Matthew Pickering at 2024-01-16T15:41:54-05:00
hadrian: Reduce Cabal verbosity
The comment claims that `simpleUserHooks` decrease verbosity, and it
does, but only for the `postConf` phase. The other phases are too
verbose with `-V`.
At the moment > 5000 lines of the build log are devoted to output from
`cabal copy`.
So I take the simple approach and just decrease the verbosity level
again.
If the output of `postConf` is essential then it would be better to
implement our own `UserHooks` which doesn't decrease the verbosity for
`postConf`.
Fixes #24338
- - - - -
16414d7d by Matthew Pickering at 2024-01-17T10:54:59-05:00
Stop retaining old ModGuts throughout subsequent simplifier phases
Each phase of the simplifier typically rewrites the majority of ModGuts,
so we want to be able to release the old ModGuts as soon as possible.
`name_ppr_ctxt` lives throught the whole optimiser phase and it was
retaining a reference to `ModGuts`, so we were failing to release the
old `ModGuts` until the end of the phase (potentially doubling peak
memory usage for that particular phase).
This was discovered using eras profiling (#24332)
Fixes #24328
- - - - -
7f0879e1 by Matthew Pickering at 2024-01-17T10:55:35-05:00
Update nofib submodule
- - - - -
5602a09c by Matthew Pickering at 2024-01-17T16:27:28+00:00
Add missing req_interp modifier to T18441fail3 and T18441fail19
These tests require the interpreter but they were failing in a different
way with the javascript backend because the interpreter was disabled and
stderr is ignored by the test.
- - - - -
87192399 by Matthew Pickering at 2024-01-17T16:27:28+00:00
Use explicit syntax rather than pure
- - - - -
4a4f1e43 by Matthew Pickering at 2024-01-17T16:27:28+00:00
ci: Fail when bindist configure fails when installing bindist
It is better to fail earlier if the configure step fails rather than
carrying on for a more obscure error message.
- - - - -
ffcc3e7a by Matthew Pickering at 2024-01-17T16:27:29+00:00
packaging: correctly propagate build/host/target to bindist configure script
At the moment the host and target which we will produce a compiler for
is fixed at the initial configure time. Therefore we need to persist
the choice made at this time into the installation bindist as well so we
look for the right tools, with the right prefixes at install time.
In the future, we want to provide a bit more control about what kind of
bindist we produce so the logic about what the host/target will have to
be written by hadrian rather than persisted by the configure script. In
particular with cross compilers we want to either build a normal stage 2
cross bindist or a stage 3 bindist, which creates a bindist which has a
native compiler for the target platform.
Fixes #21970
- - - - -
c934e36c by Matthew Pickering at 2024-01-17T16:27:29+00:00
hadrian: Fill in more of the default.host toolchain file
When you are building a cross compiler this file will be used to build
stage1 and it's libraries, so we need enough information here to work
accurately. There is still more work to be done (see for example, word
size is still fixed).
- - - - -
8a7c60b2 by Matthew Pickering at 2024-01-17T16:27:29+00:00
hadrian: Disable docs when cross compiling
Before there were a variety of ad-hoc places where doc building was
disabled when cross compiling.
* Some CI jobs sets --docs=none in gen_ci.hs
* Some CI jobs set --docs=none in .gitlab/ci.sh
* There was some logic in hadrian to not need the ["docs"] target when
making a bindist.
Now the situation is simple:
* If you are cross compiling then defaultDocsTargets is empty by
default.
In theory, there is no reason why we can't build documentation for cross
compiler bindists, but this is left to future work to generalise the
documentation building rules to allow this (#24289)
- - - - -
4d23ba1c by Matthew Pickering at 2024-01-17T16:27:29+00:00
hadrian: Build stage 2 cross compilers
* Most of hadrian is abstracted over the stage in order to remove the
assumption that the target of all stages is the same platform. This
allows the RTS to be built for two different targets for example.
* Abstracts the bindist creation logic to allow building either normal
or cross bindists. Normal bindists use stage 1 libraries and a stage 2
compiler. Cross bindists use stage 2 libararies and a stage 2
compiler.
* hadrian: Make binary-dist-dir the default build target. This allows us
to have the logic in one place about which libraries/stages to build
with cross compilers. Fixes #24192
New hadrian target:
* `binary-dist-dir-cross`: Build a cross compiler bindist (compiler =
stage 1, libraries = stage 2)
-------------------------
Metric Decrease:
T10421a
T10858
T11195
T11276
T11374
T11822
T15630
T17096
T18478
T20261
Metric Increase:
parsing001
-------------------------
- - - - -
9cdebb59 by Matthew Pickering at 2024-01-17T16:27:29+00:00
ci: Test cross bindists
We remove the special logic for testing in-tree cross
compilers and instead test cross compiler bindists, like we do for all
other platforms.
- - - - -
817a3acf by Matthew Pickering at 2024-01-17T16:27:29+00:00
ci: Javascript don't set CROSS_EMULATOR
There is no CROSS_EMULATOR needed to run javascript binaries, so we
don't set the CROSS_EMULATOR to some dummy value.
- - - - -
44dcd924 by Matthew Pickering at 2024-01-17T16:27:29+00:00
ci: Introduce CROSS_STAGE variable
In preparation for building and testing stage3 bindists we introduce the
CROSS_STAGE variable which is used by a CI job to determine what kind of
bindist the CI job should produce.
At the moment we are only using CROSS_STAGE=2 but in the future we will
have some jobs which set CROSS_STAGE=3 to produce native bindists for a
target, but produced by a cross compiler, which can be tested on by
another CI job on the native platform.
CROSS_STAGE=2: Build a normal cross compiler bindist
CROSS_STAGE=3: Build a stage 3 bindist, one which is a native compiler and library for the target
- - - - -
9aeb1139 by Matthew Pickering at 2024-01-17T16:27:29+00:00
Wrappers for stage2 cross
- - - - -
419700e4 by GHC GitLab CI at 2024-01-17T16:27:29+00:00
Fixes to in-tree args
- - - - -
1dc69bc2 by GHC GitLab CI at 2024-01-17T16:27:29+00:00
fix
- - - - -
e514613a by GHC GitLab CI at 2024-01-17T16:27:29+00:00
Fixes to generating settings file
- - - - -
30 changed files:
- .gitlab/ci.sh
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
- compiler/GHC/Builtin/Names/TH.hs
- compiler/GHC/Builtin/PrimOps.hs
- compiler/GHC/ByteCode/InfoTable.hs
- compiler/GHC/Cmm/Utils.hs
- compiler/GHC/CmmToAsm/Wasm/Asm.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/Pipeline.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Core/Subst.hs
- compiler/GHC/Core/Tidy.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Core/Unify.hs
- compiler/GHC/CoreToStg.hs
- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Driver/Config/Core/Lint.hs
- compiler/GHC/Driver/Config/Logger.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Errors.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Monad.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/HsToCore/Foreign/Utils.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Iface/Type.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c64ee583a7dcf0dbc4b273105396b440d545667c...e514613a07b2e0e5ccea943a140db7a31595008b
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c64ee583a7dcf0dbc4b273105396b440d545667c...e514613a07b2e0e5ccea943a140db7a31595008b
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/20240117/f9cd2b67/attachment-0001.html>
More information about the ghc-commits
mailing list