[Git][ghc/ghc][wip/T24676] 49 commits: Implements MO_S_Mul2 and MO_U_Mul2 using the UMULH, UMULL and SMULH instructions for AArch64
Simon Peyton Jones (@simonpj)
gitlab at gitlab.haskell.org
Thu Apr 25 21:32:39 UTC 2024
Simon Peyton Jones pushed to branch wip/T24676 at Glasgow Haskell Compiler / GHC
Commits:
dbdf1995 by Alex Mason at 2024-04-15T15:28:26+10:00
Implements MO_S_Mul2 and MO_U_Mul2 using the UMULH, UMULL and SMULH instructions for AArch64
Also adds a test for MO_S_Mul2
- - - - -
42bd0407 by Teo Camarasu at 2024-04-16T20:06:39-04:00
Make template-haskell a stage1 package
Promoting template-haskell from a stage0 to a stage1 package means that
we can much more easily refactor template-haskell.
We implement this by duplicating the in-tree `template-haskell`.
A new `template-haskell-next` library is autogenerated to mirror `template-haskell`
`stage1:ghc` to depend on the new interface of the library including the
`Binary` instances without adding an explicit dependency on `template-haskell`.
This is controlled by the `bootstrap-th` cabal flag
When building `template-haskell` modules as part of this vendoring we do
not have access to quote syntax, so we cannot use variable quote
notation (`'Just`). So we either replace these with hand-written `Name`s
or hide the code behind CPP.
We can remove the `th_hack` from hadrian, which was required when
building stage0 packages using the in-tree `template-haskell` library.
For more details see Note [Bootstrapping Template Haskell].
Resolves #23536
Co-Authored-By: Sebastian Graf <sgraf1337 at gmail.com>
Co-Authored-By: Matthew Craven <5086-clyring at users.noreply.gitlab.haskell.org>
- - - - -
3d973e47 by Ben Gamari at 2024-04-16T20:07:15-04:00
Bump parsec submodule to 3.1.17.0
- - - - -
9d38bfa0 by Simon Peyton Jones at 2024-04-16T20:07:51-04:00
Clone CoVars in CorePrep
This MR addresses #24463. It's all explained in the new
Note [Cloning CoVars and TyVars]
- - - - -
0fe2b410 by Andreas Klebinger at 2024-04-16T20:08:27-04:00
NCG: Fix a bug where we errounously removed a required jump instruction.
Add a new method to the Instruction class to check if we can eliminate a
jump in favour of fallthrough control flow.
Fixes #24507
- - - - -
9f99126a by Teo Camarasu at 2024-04-16T20:09:04-04:00
Fix documentation preview from doc-tarball job
- Include all the .html files and assets in the job artefacts
- Include all the .pdf files in the job artefacts
- Mark the artefact as an "exposed" artefact meaning it turns up in the
UI.
Resolves #24651
- - - - -
3a0642ea by Ben Gamari at 2024-04-16T20:09:39-04:00
rts: Ignore EINTR while polling in timerfd itimer implementation
While the RTS does attempt to mask signals, it may be that a foreign
library unmasks them. This previously caused benign warnings which we
now ignore.
See #24610.
- - - - -
9a53cd3f by Alan Zimmerman at 2024-04-16T20:10:15-04:00
EPA: Add additional comments field to AnnsModule
This is used in exact printing to store comments coming after the
`where` keyword but before any comments allocated to imports or decls.
It is used in ghc-exactprint, see
https://github.com/alanz/ghc-exactprint/commit/44bbed311fd8f0d053053fef195bf47c17d34fa7
- - - - -
e5c43259 by Bryan Richter at 2024-04-16T20:10:51-04:00
Remove unrunnable FreeBSD CI jobs
FreeBSD runner supply is inelastic. Currently there is only one, and
it's unavailable because of a hardware issue.
- - - - -
914eb49a by Ben Gamari at 2024-04-16T20:11:27-04:00
rel-eng: Fix mktemp usage in recompress-all
We need a temporary directory, not a file.
- - - - -
f30e4984 by Teo Camarasu at 2024-04-16T20:12:03-04:00
Fix ghc API link in docs/index.html
This was missing part of the unit ID meaning it would 404.
Resolves #24674
- - - - -
d7a3d6b5 by Ben Gamari at 2024-04-16T20:12:39-04:00
template-haskell: Declare TH.Lib.Internal as not-home
Rather than `hide`.
Closes #24659.
- - - - -
5eaa46e7 by Matthew Pickering at 2024-04-19T02:14:55-04:00
testsuite: Rename isCross() predicate to needsTargetWrapper()
isCross() was a misnamed because it assumed that all cross targets would
provide a target wrapper, but the two most common cross targets
(javascript, wasm) don't need a target wrapper.
Therefore we rename this predicate to `needsTargetWrapper()` so
situations in the testsuite where we can check whether running
executables requires a target wrapper or not.
- - - - -
55a9d699 by Simon Peyton Jones at 2024-04-19T02:15:32-04:00
Do not float HNFs out of lambdas
This MR adjusts SetLevels so that it is less eager to float a
HNF (lambda or constructor application) out of a lambda, unless
it gets to top level.
Data suggests that this change is a small net win:
* nofib bytes-allocated falls by -0.09% (but a couple go up)
* perf/should_compile bytes-allocated falls by -0.5%
* perf/should_run bytes-allocated falls by -0.1%
See !12410 for more detail.
When fiddling elsewhere, I also found that this patch had a huge
positive effect on the (very delicate) test
perf/should_run/T21839r
But that improvement doesn't show up in this MR by itself.
Metric Decrease:
MultiLayerModulesRecomp
T15703
parsing001
- - - - -
f0701585 by Alan Zimmerman at 2024-04-19T02:16:08-04:00
EPA: Fix comments in mkListSyntaxTy0
Also extend the test to confirm.
Addresses #24669, 1 of 4
- - - - -
b01c01d4 by Serge S. Gulin at 2024-04-19T02:16:51-04:00
JS: set image `x86_64-linux-deb11-emsdk-closure` for build
- - - - -
c90c6039 by Alan Zimmerman at 2024-04-19T02:17:27-04:00
EPA: Provide correct span for PatBind
And remove unused parameter in checkPatBind
Contributes to #24669
- - - - -
26036f96 by Alan Zimmerman at 2024-04-19T13:11:08-04:00
EPA: Fix span for PatBuilderAppType
Include the location of the prefix @ in the span for InVisPat.
Also removes unnecessary annotations from HsTP.
Contributes to #24669
- - - - -
dba03aab by Matthew Craven at 2024-04-19T13:11:44-04:00
testsuite: Give the pre_cmd for mhu-perf more time
- - - - -
d31fbf6c by Krzysztof Gogolewski at 2024-04-19T21:04:09-04:00
Fix quantification order for a `op` b and a %m -> b
Fixes #23764
Implements https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0640-tyop-quantification-order.rst
Updates haddock submodule.
- - - - -
385cd1c4 by Sebastian Graf at 2024-04-19T21:04:45-04:00
Make `seq#` a magic Id and inline it in CorePrep (#24124)
We can save much code and explanation in Tag Inference and StgToCmm by making
`seq#` a known-key Magic Id in `GHC.Internal.IO` and inline this definition in
CorePrep. See the updated `Note [seq# magic]`.
I also implemented a new `Note [Flatten case-bind]` to get better code for
otherwise nested case scrutinees.
I renamed the contructors of `ArgInfo` to use an `AI` prefix in order to
resolve the clash between `type CpeApp = CoreExpr` and the data constructor of
`ArgInfo`, as well as fixed typos in `Note [CorePrep invariants]`.
Fixes #24252 and #24124.
- - - - -
275e41a9 by Jade at 2024-04-20T11:10:40-04:00
Put the newline after errors instead of before them
This mainly has consequences for GHCi but also slightly alters how the
output of GHC on the commandline looks.
Fixes: #22499
- - - - -
dd339c7a by Teo Camarasu at 2024-04-20T11:11:16-04:00
Remove unecessary stage0 packages
Historically quite a few packages had to be stage0 as they depended on
`template-haskell` and that was stage0. In #23536 we made it so that was
no longer the case. This allows us to remove a bunch of packages from
this list.
A few still remain. A new version of `Win32` is required by
`semaphore-compat`. Including `Win32` in the stage0 set requires also
including `filepath` because otherwise Hadrian's dependency logic gets
confused. Once our boot compiler has a newer version of `Win32` all of
these will be able to be dropped.
Resolves #24652
- - - - -
2f8e3a25 by Alan Zimmerman at 2024-04-20T11:11:52-04:00
EPA: Avoid duplicated comments in splice decls
Contributes to #24669
- - - - -
c70b9ddb by Serge S. Gulin at 2024-04-21T16:33:43+03:00
JS: fix typos and namings (fixes #24602)
You may noted that I've also changed term of
```
, global "h$vt_double" ||= toJExpr IntV
```
See "IntV"
and
```
WaitReadOp -> \[] [fd] -> pure $ PRPrimCall $ returnS (app
"h$waidRead" [fd])
```
See "h$waidRead"
- - - - -
3db54f9b by Serge S. Gulin at 2024-04-21T16:33:43+03:00
JS: trivial checks for variable presence (fixes #24602)
- - - - -
777f108f by Serge S. Gulin at 2024-04-21T16:33:43+03:00
JS: fs module imported twice (by emscripten and by ghc-internal). ghc-internal import wrapped
in a closure to prevent conflict with emscripten (fixes #24602)
Better solution is to use some JavaScript module system like AMD, CommonJS or even UMD. It will be investigated at other issues.
At first glance we should try UMD (See https://github.com/umdjs/umd)
- - - - -
a45a5712 by Serge S. Gulin at 2024-04-21T16:33:43+03:00
JS: thread.js requires h$fds and h$fdReady to be declared for static code analysis, minimal
code copied from GHCJS (fixes #24602)
I've just copied some old pieces of GHCJS from publicly available sources (See https://github.com/Taneb/shims/blob/a6dd0202dcdb86ad63201495b8b5d9763483eb35/src/io.js#L607).
Also I didn't put details to h$fds. I took minimal and left only its object initialization: `var h$fds = {};`
- - - - -
ad90bf12 by Serge S. Gulin at 2024-04-21T16:33:43+03:00
JS: heap and stack overflows reporting defined as js hard failure (fixes #24602)
These errors were treated as a hard failure for browser application. The fix is trivial: just throw error.
- - - - -
5962fa52 by Serge S. Gulin at 2024-04-21T16:33:44+03:00
JS: Stubs for code without actual implementation detected by Google Closure Compiler (fixes #24602)
These errors were fixed just by introducing stubbed functions with throw for further implementation.
- - - - -
a0694298 by Serge S. Gulin at 2024-04-21T16:34:07+03:00
JS: Add externs to linker (fixes #24602)
After enabling jsdoc and built-in google closure compiler types I was needed to deal with the following:
1. Define NodeJS-environment types. I've just copied minimal set of externs from semi-official repo (see https://github.com/externs/nodejs/blob/6c6882c73efcdceecf42e7ba11f1e3e5c9c041f0/v8/nodejs.js#L8).
2. Define Emscripten-environment types: `HEAP8`. Emscripten already provides some externs in our code but it supposed to be run in some module system. And its definitions do not work well in plain bundle.
3. We have some functions which purpose is to add to functions some contextual information via function properties. These functions should be marked as `modifies` to let google closure compiler remove calls if these functions are not used actually by call graph. Such functions are: `h$o`, `h$sti`, `h$init_closure`, `h$setObjInfo`.
4. STG primitives such as registries and stuff from `GHC.StgToJS`. `dXX` properties were already present at externs generator function but they are started from `7`, not from `1`. This message is related: `// fixme does closure compiler bite us here?`
- - - - -
e58bb29f by Serge S. Gulin at 2024-04-21T16:34:07+03:00
JS: added both tests: for size and for correctness (fixes #24602)
By some reason MacOS builds add to stderr messages like:
Ignoring unexpected archive entry:
__.SYMDEF
...
However I left stderr to `/dev/null` for compatibility with linux CI builds.
- - - - -
909f3a9c by Serge S. Gulin at 2024-04-21T16:34:07+03:00
JS: Disable js linker warning for empty symbol table to make js tests running consistent across environments
- - - - -
83eb10da by Serge S. Gulin at 2024-04-21T16:34:07+03:00
JS: Add special preprocessor for js files due of needing to keep jsdoc comments (fixes #24602)
Our js files have defined google closure compiler types at jsdoc entries but these jsdoc entries are removed by cpp preprocessor. I considered that reusing them in javascript-backend would be a nice thing. Right now haskell processor uses `-traditional` option to deal with comments and `//` operators.
But now there are following compiler options: `-C` and `-CC`.
You can read about them at GCC (see https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html#index-CC) and CLang (see https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-CC).
It seems that `-CC` works better for javascript jsdoc than `-traditional`.
At least it leaves `/* ... */` comments w/o changes.
- - - - -
e1cf8dc2 by brandon s allbery kf8nh at 2024-04-22T03:48:26-04:00
fix link in CODEOWNERS
It seems that our local Gitlab no longer has documentation for the
`CODEOWNERS` file, but the master documentation still does. Use
that instead.
- - - - -
593f4e04 by Fendor at 2024-04-23T10:19:14-04:00
Add performance regression test for '-fwrite-simplified-core'
- - - - -
1ba39b05 by Fendor at 2024-04-23T10:19:14-04:00
Typecheck corebindings lazily during bytecode generation
This delays typechecking the corebindings until the bytecode generation
happens.
We also avoid allocating a thunk that is retained by `unsafeInterleaveIO`.
In general, we shouldn't retain values of the hydrated `Type`, as not evaluating
the bytecode object keeps it alive.
It is better if we retain the unhydrated `IfaceType`.
See Note [Hydrating Modules]
- - - - -
e916fc92 by Alan Zimmerman at 2024-04-23T10:19:50-04:00
EPA: Keep comments in a CaseAlt match
The comments now live in the surrounding location, not inside the
Match. Make sure we keep them.
Closes #24707
- - - - -
d2b17f32 by Cheng Shao at 2024-04-23T15:01:22-04:00
driver: force merge objects when building dynamic objects
This patch forces the driver to always merge objects when building
dynamic objects even when ar -L is supported. It is an oversight of
!8887: original rationale of that patch is favoring the relatively
cheap ar -L operation over object merging when ar -L is supported,
which makes sense but only if we are building static objects! Omitting
check for whether we are building dynamic objects will result in
broken .so files with undefined reference errors at executable link
time when building GHC with llvm-ar. Fixes #22210.
- - - - -
209d09f5 by Julian Ospald at 2024-04-23T15:02:03-04:00
Allow non-absolute values for bootstrap GHC variable
Fixes #24682
- - - - -
3fff0977 by Matthew Pickering at 2024-04-23T15:02:38-04:00
Don't depend on registerPackage function in Cabal
More recent versions of Cabal modify the behaviour of libAbiHash which
breaks our usage of registerPackage.
It is simpler to inline the part of registerPackage that we need and
avoid any additional dependency and complication using the higher-level
function introduces.
- - - - -
c62dc317 by Cheng Shao at 2024-04-25T01:32:02-04:00
ghc-bignum: remove obsolete ln script
This commit removes an obsolete ln script in ghc-bignum/gmp. See
060251c24ad160264ae8553efecbb8bed2f06360 for its original intention,
but it's been obsolete for a long time, especially since the removal
of the make build system. Hence the house cleaning.
- - - - -
6399d52b by Cheng Shao at 2024-04-25T01:32:02-04:00
ghc-bignum: update gmp to 6.3.0
This patch bumps the gmp-tarballs submodule and updates gmp to 6.3.0.
The tarball format is now xz, and gmpsrc.patch has been patched into
the tarball so hadrian no longer needs to deal with patching logic
when building in-tree GMP.
- - - - -
65b4b92f by Cheng Shao at 2024-04-25T01:32:02-04:00
hadrian: remove obsolete Patch logic
This commit removes obsolete Patch logic from hadrian, given we no
longer need to patch the gmp tarball when building in-tree GMP.
- - - - -
71f28958 by Cheng Shao at 2024-04-25T01:32:02-04:00
autoconf: remove obsolete patch detection
This commit removes obsolete deletection logic of the patch command
from autoconf scripts, given we no longer need to patch anything in
the GHC build process.
- - - - -
daeda834 by Sylvain Henry at 2024-04-25T01:32:43-04:00
JS: correctly handle RUBBISH literals (#24664)
- - - - -
8a06ddf6 by Matthew Pickering at 2024-04-25T11:16:16-04:00
Linearise ghc-internal and base build
This is achieved by requesting the final package database for
ghc-internal, which mandates it is fully built as a dependency of
configuring the `base` package. This is at the expense of cross-package
parrallelism between ghc-internal and the base package.
Fixes #24436
- - - - -
94da9365 by Andrei Borzenkov at 2024-04-25T11:16:54-04:00
Fix tuple puns renaming (24702)
Move tuple renaming short cutter from `isBuiltInOcc_maybe` to `isPunOcc_maybe`, so we consider incoming module.
I also fixed some hidden bugs that raised after the change was done.
- - - - -
fc45af3f by Simon Peyton Jones at 2024-04-25T23:32:29+02:00
Fix a QuickLook bug
This MR fixes the bug exposed by #24676. The problem was that
quickLookArg was trying to avoid calling tcInstFun unnecessarily; but
it was in fact necessary. But that in turn forced me into a
significant refactoring, putting more fields into EValArgQL.
I added a lot of new material to
Note [Quick Look at value arguments]
It is a bit more subtle than I would like, but the overall plan
is rather clearer now than it was.
- - - - -
30 changed files:
- .gitignore
- .gitlab-ci.yml
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- .gitlab/rel_eng/recompress-all
- CODEOWNERS
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/PrimOps.hs
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/CmmToAsm/AArch64.hs
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
- compiler/GHC/CmmToAsm/BlockLayout.hs
- compiler/GHC/CmmToAsm/Instr.hs
- compiler/GHC/CmmToAsm/Monad.hs
- compiler/GHC/CmmToAsm/PPC.hs
- compiler/GHC/CmmToAsm/PPC/Instr.hs
- compiler/GHC/CmmToAsm/Reg/Liveness.hs
- compiler/GHC/CmmToAsm/X86.hs
- compiler/GHC/CmmToAsm/X86/Instr.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Core/Opt/SetLevels.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/TyCo/FVs.hs
- compiler/GHC/Core/TyCo/Subst.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/CoreToStg/Prep.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bb5e111d2980c930201a3df83158d1323e089b60...fc45af3f2bd2c8a7819056c7978341df268f09dc
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bb5e111d2980c930201a3df83158d1323e089b60...fc45af3f2bd2c8a7819056c7978341df268f09dc
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/20240425/8a101027/attachment-0001.html>
More information about the ghc-commits
mailing list