[Git][ghc/ghc][wip/enable-late-ccs-release] 50 commits: testsuite: extend size performance tests with gzip (fixes #25046)
Matthew Pickering (@mpickering)
gitlab at gitlab.haskell.org
Tue Aug 27 16:50:35 UTC 2024
Matthew Pickering pushed to branch wip/enable-late-ccs-release at Glasgow Haskell Compiler / GHC
Commits:
eb1cb536 by Serge S. Gulin at 2024-08-06T08:54:55+00:00
testsuite: extend size performance tests with gzip (fixes #25046)
The main purpose is to create tests for minimal app (hello world and its variations, i.e. unicode used) distribution size metric.
Many platforms support distribution in compressed form via gzip. It would be nice to collect information on how much size is taken by the executional bundle for each platform at minimal edge case.
2 groups of tests are added:
1. We extend javascript backend size tests with gzip-enabled versions for all cases where an optimizing compiler is used (for now it is google closure compiler).
2. We add trivial hello world tests with gzip-enabled versions for all other platforms at CI pipeline where no external optimizing compiler is used.
- - - - -
d94410f8 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00
ghc-internal: @since for backtraceDesired
Fixes point 1 in #25052
- - - - -
bfe600f5 by Rodrigo Mesquita at 2024-08-07T11:49:19-04:00
ghc-internal: No trailing whitespace in exceptions
Fixes #25052
- - - - -
62650d9f by Andreas Klebinger at 2024-08-07T11:49:54-04:00
Add since annotation for -fkeep-auto-rules.
This partially addresses #25082.
- - - - -
5f0e23fd by Andreas Klebinger at 2024-08-07T11:49:54-04:00
Mention `-fkeep-auto-rules` in release notes.
It was added earlier but hadn't appeared in any release notes yet.
Partially addresses #25082.
- - - - -
7446a09a by Sylvain Henry at 2024-08-07T11:50:35-04:00
Cmm: don't perform unsound optimizations on 32-bit compiler hosts
- beef61351b240967b49169d27a9a19565cf3c4af enabled the use of
MO_Add/MO_Sub for 64-bit operations in the C and LLVM backends
- 6755d833af8c21bbad6585144b10e20ac4a0a1ab did the same for the x86 NCG
backend
However we store some literal values as `Int` in the compiler. As a
result, some Cmm optimizations transformed target 64-bit literals into
compiler `Int`. If the compiler is 32-bit, this leads to computing with
wrong literals (see #24893 and #24700).
This patch disables these Cmm optimizations for 32-bit compilers. This
is unsatisfying (optimizations shouldn't be compiler-word-size
dependent) but it fixes the bug and it makes the patch easy to backport.
A proper fix would be much more invasive but it shall be implemented in
the future.
Co-authored-by: amesgen <amesgen at amesgen.de>
- - - - -
d59faaf2 by Vladislav Zavialov at 2024-08-07T11:51:11-04:00
docs: Update info on RequiredTypeArguments
Add a section on "types in terms" that were implemented in 8b2f70a202
and remove the now outdated suggestion of using `type` for them.
- - - - -
39fd6714 by Sylvain Henry at 2024-08-07T11:51:52-04:00
JS: fix minor typo in base's jsbits
- - - - -
e7764575 by Sylvain Henry at 2024-08-07T11:51:52-04:00
RTS: remove hack to force old cabal to build a library with only JS sources
Need to extend JSC externs with Emscripten RTS definitions to avoid
JSC_UNDEFINED_VARIABLE errors when linking without the emcc rts.
Fix #25138
Some recompilation avoidance tests now fail. This is tracked with the
other instances of this failure in #23013. My hunch is that they were
working by chance when we used the emcc linker.
Metric Decrease:
T24602_perf_size
- - - - -
d1a40233 by Brandon Chinn at 2024-08-07T11:53:08-04:00
Support multiline strings in type literals (#25132)
- - - - -
610840eb by Sylvain Henry at 2024-08-07T11:53:50-04:00
JS: fix callback documentation (#24377)
Fix #24377
- - - - -
6ae4b76a by Zubin Duggal at 2024-08-13T13:36:57-04:00
haddock: Build haddock-api and haddock-library using hadrian
We build these two packages as regular boot library dependencies rather
than using the `in-ghc-tree` flag to include the source files into the haddock
executable.
The `in-ghc-tree` flag is moved into haddock-api to ensure that haddock built
from hackage can still find the location of the GHC bindist using `ghc-paths`.
Addresses #24834
This causes a metric decrease under non-release flavours because under these
flavours libraries are compiled with optimisation but executables are not.
Since we move the bulk of the code from the haddock executable to the
haddock-api library, we see a metric decrease on the validate flavours.
Metric Decrease:
haddock.Cabal
haddock.base
haddock.compiler
- - - - -
51ffba5d by Arnaud Spiwack at 2024-08-13T13:37:50-04:00
Add an extension field to HsRecFields
This is the Right Thing to Do™. And it prepares for storing a
multiplicity coercion there.
First step of the plan outlined here and below
https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12947#note_573091
- - - - -
4d2faeeb by Arnaud Spiwack at 2024-08-13T13:37:50-04:00
Add test for #24961
- - - - -
623b4337 by Arnaud Spiwack at 2024-08-13T13:37:50-04:00
Ensures that omitted record fields in pattern have multiplicity Many
Omitted fields were simply ignored in the type checker and produced
incorrect Core code.
Fixes #24961
Metric Increase:
RecordUpdPerf
- - - - -
c749bdfd by Sylvain Henry at 2024-08-13T13:38:41-04:00
AARCH64 linker: skip NONE relocations
This patch is part of the patches upstreamed from haskell.nix.
See https://github.com/input-output-hk/haskell.nix/pull/1960 for the
original report/patch.
- - - - -
682a6a41 by Brandon Chinn at 2024-08-13T13:39:17-04:00
Support multiline strings in TH
- - - - -
ee0a9c18 by Matthew Pickering at 2024-08-14T14:27:39-04:00
Extend -reexported-module flag to support module renaming
The -reexported-module flag now supports renaming -rexported-modules.
```
-rexported-module "A as B"
```
This feature is only relevant to multi-component sessions.
Fixes #25139
- - - - -
e9496000 by Arnaud Spiwack at 2024-08-14T14:28:20-04:00
Don't restrict eta-reduction of linear functions
This commit simply removes code. All the supporting implementation has
been done as part of !12883.
Closes #25129
- - - - -
2bb4156e by sheaf at 2024-08-14T14:28:56-04:00
Allow @ character in C labels
Generated symbol names can include the '@' character, for example when using
`__attribute__((vectorcall))`.
- - - - -
7602ca23 by Sylvain Henry at 2024-08-14T14:29:36-04:00
Linker: replace blind tuple with a datatype + docs
- - - - -
bdd77b9e by sheaf at 2024-08-16T12:47:11-04:00
isIrrefutableHsPat: look up ConLikes in the HscEnv
At GhcRn stage, in isIrrefutableHsPat we only looked up data constructors
in the RdrEnv, which meant that we lacked fallibility information for
out-of-scope constructors (which can arise from Template Haskell splices).
Instead, we use 'lookupGREInfo', which looks up the information in
the type environment. This was the correct function to call all along,
but was not used in 572fbc44 due to import cycle reasons. The appropriate
functions, 'irrefutableConLike{Rn,Tc}' have been moved to 'GHC.Rename.Env',
which avoids import cycles.
Fixes #25164
- - - - -
4bee377c by Sylvain Henry at 2024-08-16T12:47:53-04:00
Linker: some refactoring to prepare for #24886
- Rename LoadedBCOs into LazyBCOs
- Bundle SptEntries with CompiledByteCode and removed [SptEntry] field
from the BCOs constructor
- Rename Linkable's LM constructor into Linkable: in the past we had LM
and LP for Module and Package, now we only have the former.
- Rename Unlinked into LinkablePart (and linkableUnlinked into
linkableParts)
- Use NonEmpty to encode invariant in Linkable's linkableParts type
- Add helpers: linkableLibs, linkableBCOs, etc.
- Add documentation
- Remove partial nameOfObject
- Rename nameOfObject_maybe into linkablePartPath
- Rename byteCodeOfObject into linkablePartAllBCOs.
- Refactor linkablePartAllBCOs to avoid a panic if a LazyBCO has a C
stub. Document the fact that LazyBCOs are returned in this case
(contrary to linkableBCOs which only returns non-lazy ones)
Refactoring done while trying to understand how to adapt the linker code
to support the JS backend too (cf #24886).
- - - - -
fa0dbaca by Mario Blažević at 2024-08-17T03:31:32+00:00
Implements the Exportable Named Default proposal (#24305)
This squashed commit adds support for exportable named defaults, the accepted
GHC proposal at https://github.com/ghc-proposals/ghc-proposals/pull/409
The proposal extends the Haskell '98 declarations
default (Int, Double)
which were implicitly always applying to Num class alone, to allow specifying
an arbitrary single-parameter class:
default IsString (Text, String)
The effect of this declaration would be to eliminate the ambiguous type errors
around string literals when OverloadedStrings extension is active. The
declaration by itself has effect only in its module, so the proposal also adds
the ability to export class defaults:
module MyModule (default IsIstring)
Once the language extension is published and established, we can consider using
it in base and other libraries.
See Note [Named default declarations] in GHC.Tc.Gen.Default
for implementation details.
- - - - -
1deba6b2 by Simon Peyton Jones at 2024-08-17T13:58:13-04:00
Make kick-out more selective
This MR revised the crucial kick-out criteria in the constraint solver.
Ticket #24984 showed an example in which
* We were kicking out unnecessarily
* That gave rise to extra work, of course
* But it /also/ led to exponentially-sized coercions due to lack
of sharing in coercions (something we want to fix separately #20264)
This MR sharpens up the kick-out criteria; specifially in (KK2) we look
only under type family applications if (fs>=fw).
This forced me to understand the existing kick-out story, and I ended
up rewriting many of the careful Notes in GHC.Tc.Solver.InertSet.
Especially look at the new `Note [The KickOut Criteria]`
The proof of termination is not air-tight, but it is better than before,
and both Richard and I think it's correct :-).
- - - - -
88488847 by Cheng Shao at 2024-08-18T04:44:01+02:00
testsuite: remove undesired -fasm flag from test ways
This patch removes the -fasm flag from test ways, except ways like
optasm that explicitly state they are meant to be compiled with NCG
backend. Most test ways should use the default codegen backend, and
the precense of -fasm can cause stderr mismatches like this when GHC
is configured with the unregisterised backend:
```
--- /dev/null
+++ /tmp/ghctest-3hydwldj/test spaces/testsuite/tests/profiling/should_compile/prof-late-cc.run/prof-late-cc.comp.stderr.normalised
@@ -0,0 +1,2 @@
+when making flags consistent: warning: [GHC-74335] [-Winconsistent-flags (in -Wdefault)]
+ Target platform uses unregisterised ABI, so compiling via C
*** unexpected failure for prof-late-cc(prof_no_auto)
```
This has been breaking the wasm unreg nightly job since !12595 landed.
- - - - -
3a145315 by Cheng Shao at 2024-08-18T13:05:45-04:00
ghci: fix isMinTTY.h casing for Windows targets
This commit fixes isMinTTY.h casing in isMinTTY.c that's compiled for
Windows targets. While this looks harmless given Windows filesystems
are case-insensitive by default, it does cause a compilation warning
with recent versions of clang, so we might as well fix the casing:
```
driver\ghci\isMinTTY.c:10:10: error:
warning: non-portable path to file '"isMinTTY.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
|
10 | #include "isMINTTY.h"
| ^
#include "isMINTTY.h"
^~~~~~~~~~~~
"isMinTTY.h"
1 warning generated.
```
- - - - -
5f972bfb by Zubin Duggal at 2024-08-21T03:18:15-04:00
compiler: Fix pretty printing of ticked prefix constructors (#24237)
- - - - -
ef0a08e7 by Mike Pilgrem at 2024-08-21T03:18:57-04:00
Fix #15773 Clarify further -rtsopts 'defaults' in docs
- - - - -
05a4be58 by Sebastian Graf at 2024-08-21T03:19:33-04:00
Improve efficiency of `assertError` (#24625)
... by moving `lazy` to the exception-throwing branch.
It's all documented in `Note [Strictness of assertError]`.
- - - - -
c29b2b5a by sheaf at 2024-08-21T13:11:30-04:00
GHCi debugger: drop record name spaces for Ids
When binding new local variables at a breakpoint, we should create
Ids with variable namespace, and not record field namespace. Otherwise
the rest of the compiler falls over because the IdDetails are wrong.
Fixes #25109
- - - - -
bd82ac9f by Hécate Kleidukos at 2024-08-21T13:12:12-04:00
base: Final deprecation of GHC.Pack
The timeline mandated by #21461 has come to its term and after two years
and four minor releases, we are finally removing GHC.Pack from base.
Closes #21536
- - - - -
5092dbff by Sylvain Henry at 2024-08-21T13:12:54-04:00
JS: support rubbish static literals (#25177)
Support for rubbish dynamic literals was added in #24664. This patch
does the same for static literals.
Fix #25177
- - - - -
b5a2c061 by Phil de Joux at 2024-08-21T13:13:33-04:00
haddock docs: prefix comes before, postfix comes after
- - - - -
6fde3685 by Marcin Szamotulski at 2024-08-21T23:15:39-04:00
haddock: include package info with --show-interface
- - - - -
7e02111b by Andreas Klebinger at 2024-08-21T23:16:15-04:00
Document the (x86) SIMD macros.
Fixes #25021.
- - - - -
05116c83 by Rodrigo Mesquita at 2024-08-22T10:37:44-04:00
ghc-internal: Derive version from ghc's version
Fixes #25005
- - - - -
73f5897d by Ben Gamari at 2024-08-22T10:37:44-04:00
base: Deprecate GHC.Desugar
See https://github.com/haskell/core-libraries-committee/issues/216.
This will be removed in GHC 9.14.
- - - - -
821d0a9a by Cheng Shao at 2024-08-22T10:38:22-04:00
compiler: Store ForeignStubs and foreign C files in interfaces
This data is used alongside Core bindings to reconstruct intermediate
build products when linking Template Haskell splices with bytecode.
Since foreign stubs and files are generated in the pipeline, they were
lost with only Core bindings stored in interfaces.
The interface codec type `IfaceForeign` contains a simplified
representation of `ForeignStubs` and the set of foreign sources that
were manually added by the user.
When the backend phase writes an interface, `mkFullIface` calls
`encodeIfaceForeign` to read foreign source file contents and assemble
`IfaceForeign`.
After the recompilation status check of an upstream module,
`initWholeCoreBindings` calls `decodeIfaceForeign` to restore
`ForeignStubs` and write the contents of foreign sources to the file
system as temporary files.
The restored foreign inputs are then processed by `hscInteractive` in
the same manner as in a regular pipeline.
When linking the stub objects for splices, they are excluded from suffix
adjustment for the interpreter way through a new flag in `Unlinked`.
For details about these processes, please consult Note [Foreign stubs
and TH bytecode linking].
Metric Decrease:
T13701
- - - - -
f0408eeb by Cheng Shao at 2024-08-23T10:37:10-04:00
git: remove a.out and include it in .gitignore
a.out is a configure script byproduct. It was mistakenly checked into
the tree in !13118. This patch removes it, and include it in
.gitignore to prevent a similar error in the future.
- - - - -
1f95c5e4 by Matthew Pickering at 2024-08-23T10:37:46-04:00
docs: Fix code-block syntax on old sphinx version
This code-block directive breaks the deb9 sphinx build.
Fixes #25201
- - - - -
27dceb42 by Sylvain Henry at 2024-08-26T11:05:11-04:00
JS: add basic support for POSIX *at functions (#25190)
openat/fstatat/unlinkat/dup are now used in the recent release of the
`directory` and `file-io` packages.
As such, these functions are (indirectly) used in the following tests
one we'll bump the `directory` submodule (see !13122):
- openFile008
- jsOptimizer
- T20509
- bkpcabal02
- bkpcabal03
- bkpcabal04
- - - - -
c68be356 by Matthew Pickering at 2024-08-26T11:05:11-04:00
Update directory submodule to latest master
The primary reason for this bump is to fix the warning from `ghc-pkg
check`:
```
Warning: include-dirs: /data/home/ubuntu/.ghcup/ghc/9.6.2/lib/ghc-9.6.2/lib/../lib/aarch64-linux-ghc-9.6.2/directory-1.3.8.1/include doesn't exist or isn't a directory
```
This also requires adding the `file-io` package as a boot library (which
is discussed in #25145)
Fixes #23594 #25145
- - - - -
4ee094d4 by Matthew Pickering at 2024-08-26T11:05:47-04:00
Fix aarch64-alpine target platform description
We are producing bindists where the target triple is
aarch64-alpine-linux
when it should be
aarch64-unknown-linux
This is because the bootstrapped compiler originally set the target
triple to `aarch64-alpine-linux` which is when propagated forwards by
setting `bootstrap_target` from the bootstrap compiler target.
In order to break this chain we explicitly specify build/host/target for
aarch64-alpine.
This requires a new configure flag `--enable-ignore-` which just
switches off a validation check that the target platform of the
bootstrap compiler is the same as the build platform. It is the same,
but the name is just wrong.
These commits can be removed when the bootstrap compiler has the correct
target triple (I looked into patching this on ci-images, but it looked
hard to do correctly as the build/host platform is not in the settings
file).
Fixes #25200
- - - - -
e0e0f2b2 by Matthew Pickering at 2024-08-26T11:05:47-04:00
Bump nixpkgs commit for gen_ci script
- - - - -
63a27091 by doyougnu at 2024-08-26T20:39:30-04:00
rts: win32: emit additional debugging information
-- migration from haskell.nix
- - - - -
aaab3d10 by Vladislav Zavialov at 2024-08-26T20:40:06-04:00
Only export defaults when NamedDefaults are enabled (#25206)
This is a reinterpretation of GHC Proposal #409 that avoids a breaking
change introduced in fa0dbaca6c "Implements the Exportable Named Default proposal"
Consider a module M that has no explicit export list:
module M where
default (Rational)
Should it export the default (Rational)?
The proposal says "yes", and there's a test case for that:
default/DefaultImport04.hs
However, as it turns out, this change in behavior breaks existing
programs, e.g. the colour-2.3.6 package can no longer be compiled,
as reported in #25206.
In this patch, we make implicit exports of defaults conditional on
the NamedDefaults extension. This fix is unintrusive and compliant
with the existing proposal text (i.e. it does not require a proposal
amendment). Should the proposal be amended, we can go for a simpler
solution, such as requiring all defaults to be exported explicitly.
Test case: testsuite/tests/default/T25206.hs
- - - - -
3ac15550 by Matthew Pickering at 2024-08-27T17:43:31+01:00
Don't compile `asBox` with -fprof-late
The `asBox` function is intended to store exactly the closure which the
user passes to it. Placing a cost centre on asBox introduces a thunk,
which violates this expectation and can change the result of using asBox
when profiling is enabled.
See #25212 for more details and ample opportunity to discuss if this is
a bug or not.
- - - - -
c94fdbf0 by Matthew Pickering at 2024-08-27T17:49:43+01:00
Fix normalisation of .prof files
Fix 1: If a cost centre contained CAF then the normalisation was
corrupted, now only check if CAF is at the start of a line.
Fix 2: "no location info" contain a space, which messed up the next
normalisation logic which assumed that columns didn't have spaced in.
- - - - -
08bea522 by Matthew Pickering at 2024-08-27T17:49:43+01:00
packaging: Enable late-ccs for release flavour
This enables late cost centres when building profiled libraries and
subsequently greatly improves the resolution of cost centre stacks when
profiling.
Fixes #21732
- - - - -
30 changed files:
- .gitignore
- .gitlab/generate-ci/flake.lock
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- .gitmodules
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/Types.hs
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Cmm/Opt.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Core/Predicate.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/CoreToIface.hs
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/Config/Finder.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Errors/Types.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/ImpExp.hs
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/HsToCore.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Pmc/Desugar.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6355be32c688993be2df5610f0dd14abe1c0e7c7...08bea522cff68819233dc0479778aea2161b5ec6
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6355be32c688993be2df5610f0dd14abe1c0e7c7...08bea522cff68819233dc0479778aea2161b5ec6
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/20240827/24af71fd/attachment-0001.html>
More information about the ghc-commits
mailing list