[Git][ghc/ghc][wip/int64-everywhere] 54 commits: base: Better error message on invalid getSystemTimerManager call
John Ericson
gitlab at gitlab.haskell.org
Tue Sep 8 03:51:16 UTC 2020
John Ericson pushed to branch wip/int64-everywhere at Glasgow Haskell Compiler / GHC
Commits:
329f7cb9 by Ben Gamari at 2020-08-31T22:59:14-04:00
base: Better error message on invalid getSystemTimerManager call
Previously we would produce a rather unhelpful pattern match failure
error in the case where the user called `getSystemTimerManager` in a
program which isn't built with `-threaded`. This understandably confused
the user in #15616.
Fixes #15616.
- - - - -
f6d70a8f by Roland Senn at 2020-08-31T22:59:50-04:00
Add tests for #15617.
Avoid a similar regression in the future.
- - - - -
e5969fd0 by Roland Senn at 2020-08-31T23:00:27-04:00
Add additional tests for #18172 (Followup MR 3543)
There was still one active discussion [thread](https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3543#note_284325) when MR !3543 got merged.
This MR adds the requested tests exercising the changes in
`compiler/GHC/HsToCore/Match/Literal.hs:warnAboutEmptyEnumerations` and its sub-functions.
- - - - -
fe18b482 by Ben Gamari at 2020-08-31T23:01:02-04:00
Bump Win32 and process submodules
- - - - -
2da93308 by Sylvain Henry at 2020-08-31T23:01:39-04:00
Hadrian: fix slow-validate flavour (#18586)
- - - - -
85e13008 by Andreas Klebinger at 2020-08-31T23:02:15-04:00
Update dominator code with fixes from the dom-lt package.
Two bugs turned out in the package that have been fixed since.
This MR includes this fixes in the GHC port of the code.
- - - - -
dffb38fa by Andreas Klebinger at 2020-08-31T23:02:15-04:00
Dominators.hs: Use unix line endings
- - - - -
6189cc04 by Moritz Angermann at 2020-08-31T23:02:50-04:00
[fixup 3433] move debugBelch into IF_DEBUG(linker)
The commit in dff1cb3d9c111808fec60190747272b973547c52 incorrectly left
the `debugBelch` function without a comment or IF_DEBUG(linker,)
decoration. This rectifies it.
Needs at least a 8.10 backport, as it was backported in 6471cc6aff80d5deebbdb1bf7b677b31ed2af3d5
- - - - -
bcb68a3f by Sylvain Henry at 2020-08-31T23:03:27-04:00
Don't store HomeUnit in UnitConfig
Allow the creation of a UnitConfig (hence of a UnitState) without having
a HomeUnit. It's required for #14335.
- - - - -
0a372387 by Sylvain Henry at 2020-08-31T23:04:04-04:00
Fix documentation and fix "check" bignum backend (#18604)
- - - - -
eb85f125 by Moritz Angermann at 2020-08-31T23:04:39-04:00
Set the dynamic-system-linker flag to Manual
This flag should be user controllable, hence Manual: True.
- - - - -
380ef845 by Sven Tennie at 2020-08-31T23:05:14-04:00
Ignore more files
Ignore files from "new style" cabal builds (dist-newstyle folders) and
from clangd (C language server).
- - - - -
74a7fbff by Takenobu Tani at 2020-08-31T23:05:51-04:00
Limit upper version of Happy for ghc-9.0 and earlier (#18620)
This patch adds the upper bound of a happy version for ghc-9.0
and earlier.
Currently, we can't use happy-1.20.0 for ghc-9.0.
See #18620.
- - - - -
a4473f02 by Takenobu Tani at 2020-08-31T23:05:51-04:00
Limit upper version of Happy for ghc-9.2 (#18620)
This patch adds the upper bound of a happy version for ghc-9.2.
Currently, We can use happy-1.19 or happy-1.20 for ghc-9.2.
See #18620.
- - - - -
a8a2568b by Sylvain Henry at 2020-08-31T23:06:28-04:00
Bignum: add BigNat compat functions (#18613)
- - - - -
884245dd by Sylvain Henry at 2020-09-01T12:39:36-04:00
Fix FastString lexicographic ordering (fix #18562)
- - - - -
4b4fbc58 by Sylvain Henry at 2020-09-01T12:39:36-04:00
Remove "Ord FastString" instance
FastStrings can be compared in 2 ways: by Unique or lexically. We don't
want to bless one particular way with an "Ord" instance because it leads
to bugs (#18562) or to suboptimal code (e.g. using lexical comparison
while a Unique comparison would suffice).
UTF-8 encoding has the advantage that sorting strings by their encoded
bytes also sorts them by their Unicode code points, without having to
decode the actual code points. BUT GHC uses Modified UTF-8 which
diverges from UTF-8 by encoding \0 as 0xC080 instead of 0x00 (to avoid
null bytes in the middle of a String so that the string can still be
null-terminated). This patch adds a new `utf8CompareShortByteString`
function that performs sorting by bytes but that also takes Modified
UTF-8 into account. It is much more performant than decoding the strings
into [Char] to perform comparisons (which we did in the previous patch).
Bump haddock submodule
- - - - -
b4edcde7 by Ben Gamari at 2020-09-01T14:53:42-04:00
testsuite: Add broken test for #18302
- - - - -
bfab2a30 by Sebastian Graf at 2020-09-02T15:54:55-04:00
Turn on -XMonoLocalBinds by default (#18430)
And fix the resulting type errors.
Co-authored-by: Krzysztof Gogolewski <krz.gogolewski at gmail.com>
Metric Decrease:
parsing001
- - - - -
c30cc0e9 by David Feuer at 2020-09-02T15:55:31-04:00
Remove potential space leak from Data.List.transpose
Previously, `transpose` produced a list of heads
and a list of tails independently. This meant that
a function using only some heads, and only some tails,
could potentially leak space. Use `unzip` to work
around the problem by producing pairs and selector
thunks instead. Time and allocation behavior will
be worse, but there should be no more leak potential.
- - - - -
ffc3da47 by Sylvain Henry at 2020-09-02T15:56:11-04:00
Remove outdated note
- - - - -
85e62123 by Sylvain Henry at 2020-09-02T15:56:48-04:00
Bignum: add missing compat import/export functions
- - - - -
397c2b03 by Ben Gamari at 2020-09-03T17:31:47-04:00
configure: Work around Raspbian's silly packaging decisions
See #17856.
- - - - -
4891c18a by Kathryn Spiers at 2020-09-03T17:32:24-04:00
expected-undocumented-flags remove kill flags
It looks like the flags were removed in https://gitlab.haskell.org/ghc/ghc/-/commit/3e27205a66b06a4501d87eb31e285eadbc693eb7
and can safely be removed here
- - - - -
1d6d6488 by Sylvain Henry at 2020-09-04T16:24:20-04:00
Don't rely on CLabel's Outputable instance in CmmToC
This is in preparation of the removal of sdocWithDynFlags (#10143),
hence of the refactoring of CLabel's Outputable instance.
- - - - -
89ce7cdf by Sylvain Henry at 2020-09-04T16:24:59-04:00
DynFlags: use Platform in foldRegs*
- - - - -
220ad8d6 by Sylvain Henry at 2020-09-04T16:24:59-04:00
DynFlags: don't pass DynFlags to cmmImplementSwitchPlans
- - - - -
c1e54439 by Ryan Scott at 2020-09-04T16:25:35-04:00
Introduce isBoxedTupleDataCon and use it to fix #18644
The code that converts promoted tuple data constructors to
`IfaceType`s in `GHC.CoreToIface` was using `isTupleDataCon`, which
conflates boxed and unboxed tuple data constructors. To avoid this,
this patch introduces `isBoxedTupleDataCon`, which is like
`isTupleDataCon` but only works for _boxed_ tuple data constructors.
While I was in town, I was horribly confused by the fact that there
were separate functions named `isUnboxedTupleCon` and
`isUnboxedTupleTyCon` (similarly, `isUnboxedSumCon` and
`isUnboxedSumTyCon`). It turns out that the former only works for
data constructors, despite its very general name! I opted to rename
`isUnboxedTupleCon` to `isUnboxedTupleDataCon` (similarly, I renamed
`isUnboxedSumCon` to `isUnboxedSumDataCon`) to avoid this potential
confusion, as well as to be more consistent with
the naming convention I used for `isBoxedTupleDataCon`.
Fixes #18644.
- - - - -
07bdcac3 by GHC GitLab CI at 2020-09-04T22:26:25-04:00
configure: Avoid hard-coded ld path on Windows
The fix to #17962 ended up regressing on Windows as it failed to
replicate the logic responsible for overriding the toolchain paths on
Windows. This resulted in a hard-coded path to a directory that likely
doesn't exist on the user's system (#18550).
- - - - -
0be8e746 by Benjamin Maurer at 2020-09-04T22:27:01-04:00
Documented the as of yet undocumented '--print-*' GHC flags,
as well as `-split-objs`, since that is related to
`--print-object-splitting-supported`.
See #18641
- - - - -
4813486f by Sylvain Henry at 2020-09-04T22:27:44-04:00
Move Hadrian's wiki pages in tree (fix #16165)
Only the debugging page contains interesting stuff. Some of this stuff
looks old (e.g. recommending "cabal install")...
- - - - -
7980ae23 by GHC GitLab CI at 2020-09-05T14:50:52-04:00
rts: Consistently use stgMallocBytes instead of malloc
This can help in debugging RTS memory leaks since all allocations go
through the same interface.
- - - - -
67059893 by Ben Gamari at 2020-09-05T14:51:27-04:00
configure: Fix whitespace
- - - - -
be2cc0ad by Ben Gamari at 2020-09-05T14:51:27-04:00
gitlab-ci: More intelligent detection of locale availability
Previously ci.sh would unconditionally use C.UTF-8. However, this fails
on Centos 7, which appears not to provide this locale. Now we first try
C.UTF-8, then try en_US.UTF-8, then fail.
Works around #18607.
- - - - -
15dca847 by Ben Gamari at 2020-09-05T14:51:27-04:00
gitlab-ci: Rename RELEASE variable to RELEASE_JOB
This interfered with the autoconf variable of the same name, breaking
pre-release builds.
- - - - -
bec0d170 by Ben Gamari at 2020-09-05T14:51:27-04:00
gitlab-ci: Bump Windows toolchain version
This should have been done when we bumped the bootstrap compiler to
8.8.4.
- - - - -
9fbaee21 by Ben Gamari at 2020-09-05T14:51:27-04:00
gitlab-ci: Drop Windows make job
These are a significant burden on our CI resources and end up failing
quite often due to #18274. Here I drop the make jobs during
validaion; it is now run only during the nightly builds.
- - - - -
869f6e19 by Ben Gamari at 2020-09-05T14:51:27-04:00
testsuite: Drop Windows-specific output for parseTree
The normalise_slashes normaliser should handle this.
- - - - -
2c9f743c by Ben Gamari at 2020-09-05T14:51:28-04:00
testsuite: Mark T5975[ab] as broken on Windows
Due to #7305.
- - - - -
643785e3 by Ben Gamari at 2020-09-05T14:51:28-04:00
gitlab-ci: Fix typo
A small typo in a rule regular expression.
- - - - -
c5413fc6 by Wander Hillen at 2020-09-07T09:33:54-04:00
Add clarification regarding poll/kqueue flags
- - - - -
10434d60 by Ben Gamari at 2020-09-07T09:34:32-04:00
gitlab-ci: Configure bignum backend in Hadrian builds
- - - - -
d4bc9f0d by Ben Gamari at 2020-09-07T09:34:32-04:00
gitlab-ci: Use hadrian builds for Windows release artifacts
- - - - -
4ff93292 by Moritz Angermann at 2020-09-07T21:18:39-04:00
[macOS] improved runpath handling
In b592bd98ff25730bbe3c13d6f62a427df8c78e28 we started using
-dead_strip_dylib on macOS when lining dynamic libraries and binaries.
The underlying reason being the Load Command Size Limit in macOS
Sierra (10.14) and later.
GHC will produce @rpath/libHS... dependency entries together with a
corresponding RPATH entry pointing to the location of the libHS...
library. Thus for every library we produce two Load Commands. One to
specify the dependent library, and one with the path where to find it.
This makes relocating libraries and binaries easier, as we just need to
update the RPATH entry with the install_name_tool. The dynamic linker
will then subsitute each @rpath with the RPATH entries it finds in the
libraries load commands or the environement, when looking up @rpath
relative libraries.
-dead_strip_dylibs intructs the linker to drop unused libraries. This in
turn help us reduce the number of referenced libraries, and subsequently
the size of the load commands. This however does not remove the RPATH
entries. Subsequently we can end up (in extreme cases) with only a
single @rpath/libHS... entry, but 100s or more RPATH entries in the Load
Commands.
This patch rectifies this (slighly unorthodox) by passing *no* -rpath
arguments to the linker at link time, but -headerpad 8000. The
headerpad argument is in hexadecimal and the maxium 32k of the load
command size. This tells the linker to pad the load command section
enough for us to inject the RPATHs later. We then proceed to link the
library or binary with -dead_strip_dylibs, and *after* the linking
inspect the library to find the left over (non-dead-stripped)
dependencies (using otool). We find the corresponding RPATHs for each
@rpath relative dependency, and inject them into the library or binary
using the install_name_tool. Thus achieving a deadstripped dylib (and
rpaths) build product.
We can not do this in GHC, without starting to reimplement a dynamic
linker as we do not know which symbols and subsequently libraries are
necessary.
Commissioned-by: Mercury Technologies, Inc. (mercury.com)
- - - - -
df04b81e by Sylvain Henry at 2020-09-07T21:19:20-04:00
Move DynFlags test into updateModDetailsIdInfos's caller (#17957)
- - - - -
d0bebd40 by John Ericson at 2020-09-07T23:49:54-04:00
Use "to" instead of "2" in internal names of conversion ops
Change the contructors for the primop union, and also names of the
literal conversion functions.
"2" runs into trouble when we need to do conversion from fixed-width
types, and end up with thing like "Int642Word".
Only the names internal to GHC are changed, as I don't want to worry
about breaking changes ATM.
- - - - -
8e0263f9 by John Ericson at 2020-09-07T23:50:45-04:00
Make fixed-size `Int32#` and `Int64#`
The boxed Int64 uses Int64#, but Int32# still uses Int#. The 32-bit case
is less pressing to change because it is not a source of brittle
CPP---it is the same thing on all platforms.
We need Int64/Word64 constant folding to avoid the let/app restriction on Core, so
that is implemented now. 32-bit constant unfolding and 32-bit literals
are left as follow-up.
This is the bulk of #11953
ghc-bignum: add support for Word64#/Int64# on 64-bit arch
Fix fingerprint Core generation
Fix some tests
Co-authored-by: Sylvain Henry <hsyl20 at gmail.com>
- - - - -
fa3c9b9b by John Ericson at 2020-09-07T23:50:46-04:00
Inline INT64 and WORD64 macros in primops.txt.pp
The definition is now unconditional so there is no reason for that CPP.
- - - - -
dc433872 by Sylvain Henry at 2020-09-07T23:50:46-04:00
Fix toArgRep
- - - - -
ae427ecb by Sylvain Henry at 2020-09-07T23:50:47-04:00
Adapt rules from #16402 to Word64#/Int64#
- - - - -
b2a579ec by John Ericson at 2020-09-07T23:50:47-04:00
Copy enumFrom* implementations from Int/Word for Int64/Word64
Without this, we don't get proper list fusion.
I think this sort of copying is OK for now, but we absolutely need
something better if we are going to make `IntN` use `IntN#` for all `N`.
The degree to which proper metaprogramming has been punted upon by
factoring everything through the native-sized types is disconcerting.
- - - - -
38819576 by John Ericson at 2020-09-07T23:50:47-04:00
`integerFromInt64#` can be inlined when the word size is >= 64 bits
Maybe this will help with the renaming test failure?
- - - - -
3d10baf1 by John Ericson at 2020-09-07T23:50:47-04:00
Add builtin rule for `divInt64#` and `modInt64#`
- - - - -
2c6bf270 by John Ericson at 2020-09-07T23:50:47-04:00
Add missing floats <-> int/word 64 rule and primops
- - - - -
30 changed files:
- .gitignore
- .gitlab-ci.yml
- .gitlab/ci.sh
- aclocal.m4
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/Types/Literals.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Cmm/Expr.hs
- compiler/GHC/Cmm/LayoutStack.hs
- compiler/GHC/Cmm/Lint.hs
- compiler/GHC/Cmm/Liveness.hs
- compiler/GHC/Cmm/MachOp.hs
- compiler/GHC/Cmm/Node.hs
- compiler/GHC/Cmm/Pipeline.hs
- compiler/GHC/Cmm/ProcPoint.hs
- compiler/GHC/Cmm/Sink.hs
- compiler/GHC/Cmm/Switch/Implement.hs
- compiler/GHC/CmmToAsm/CFG/Dominators.hs
- compiler/GHC/CmmToAsm/CPrim.hs
- compiler/GHC/CmmToAsm/PPC/CodeGen.hs
- compiler/GHC/CmmToAsm/Reg/Linear.hs
- compiler/GHC/CmmToAsm/SPARC/CodeGen.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/CmmToC.hs
- compiler/GHC/CmmToLlvm/CodeGen.hs
- compiler/GHC/Core/Coercion/Axiom.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/DataCon.hs-boot
- compiler/GHC/Core/Lint.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4ad1892180f714a36707de8a7702fd12cb8f248b...2c6bf2709c79fe8db96a3458aa00b2096a31f16e
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4ad1892180f714a36707de8a7702fd12cb8f248b...2c6bf2709c79fe8db96a3458aa00b2096a31f16e
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/20200907/ef23df86/attachment-0001.html>
More information about the ghc-commits
mailing list