[Git][ghc/ghc][wip/T21623] 53 commits: Drop a kludge for binutils<2.17, which is now over 10 years old.

Simon Peyton Jones (@simonpj) gitlab at gitlab.haskell.org
Fri Nov 4 10:25:10 UTC 2022



Simon Peyton Jones pushed to branch wip/T21623 at Glasgow Haskell Compiler / GHC


Commits:
d45d8cb3 by M Farkas-Dyck at 2022-11-01T12:47:21-04:00
Drop a kludge for binutils<2.17, which is now over 10 years old.

- - - - -
8ee8b418 by Nicolas Trangez at 2022-11-01T12:47:58-04:00
rts: `name` argument of `createOSThread` can be `const`

Since we don't intend to ever change the incoming string, declare this
to be true.

Also, in the POSIX implementation, the argument is no longer `STG_UNUSED`
(since ee0deb8054da2a597fc5624469b4c44fd769ada2) in any code path.

See: https://gitlab.haskell.org/ghc/ghc/-/commit/ee0deb8054da2a597fc5624469b4c44fd769ada2#note_460080

- - - - -
13b5f102 by Nicolas Trangez at 2022-11-01T12:47:58-04:00
rts: fix lifetime of `start_thread`s `name` value

Since, unlike the code in ee0deb8054da2^, usage of the `name` value
passed to `createOSThread` now outlives said function's lifetime, and
could hence be released by the caller by the time the new thread runs
`start_thread`, it needs to be copied.

See: https://gitlab.haskell.org/ghc/ghc/-/commit/ee0deb8054da2a597fc5624469b4c44fd769ada2#note_460080
See: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9066

- - - - -
edd175c9 by Nicolas Trangez at 2022-11-01T12:47:58-04:00
rts: fix OS thread naming in ticker

Since ee0deb805, the use of `pthread_setname_np` on Darwin was fixed
when invoking `createOSThread`. However, the 'ticker' has some
thread-creation code which doesn't rely on `createOSThread`, yet also
uses `pthread_setname_np`.

This patch enforces all thread creation to go through a single
function, which uses the (correct) thread-naming code introduced in
ee0deb805.

See: https://gitlab.haskell.org/ghc/ghc/-/commit/ee0deb8054da2a597fc5624469b4c44fd769ada2
See: https://gitlab.haskell.org/ghc/ghc/-/issues/22206
See: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9066

- - - - -
b7a00113 by Krzysztof Gogolewski at 2022-11-01T12:48:35-04:00
Typo: rename -fwrite-if-simplfied-core to -fwrite-if-simplified-core

- - - - -
30e625e6 by Vladislav Zavialov at 2022-11-01T12:49:10-04:00
ThToHs: fix overzealous parenthesization

Before this patch, when converting from TH.Exp to LHsExpr GhcPs,
the compiler inserted more parentheses than required:

	((f a) (b + c)) d

This was happening because the LHS of the function application was
parenthesized as if it was the RHS.

Now we use funPrec and appPrec appropriately and produce sensibly
parenthesized expressions:

	f a (b + c) d

I also took the opportunity to remove the special case for LamE,
which was not special at all and simply duplicated code.

- - - - -
0560821f by Simon Peyton Jones at 2022-11-01T12:49:47-04:00
Add accurate skolem info when quantifying

Ticket #22379 revealed that skolemiseQuantifiedTyVar was
dropping the passed-in skol_info on the floor when it encountered
a SkolemTv.  Bad!  Several TyCons thereby share a single SkolemInfo
on their binders, which lead to bogus error reports.

- - - - -
38d19668 by Fendor at 2022-11-01T12:50:25-04:00
Expose UnitEnvGraphKey for user-code

- - - - -
77e24902 by Simon Peyton Jones at 2022-11-01T12:51:00-04:00
Shrink test case for #22357

Ryan Scott offered a cut-down repro case
(60 lines instead of more than 700 lines)

- - - - -
4521f649 by Simon Peyton Jones at 2022-11-01T12:51:00-04:00
Add two tests for #17366

- - - - -
6b400d26 by Nicolas Trangez at 2022-11-02T12:06:48-04:00
rts: introduce (and use) `STG_NORETURN`

Instead of sprinkling the codebase with
`GNU(C3)_ATTRIBUTE(__noreturn__)`, add a `STG_NORETURN` macro (for,
basically, the same thing) similar to `STG_UNUSED` and others, and
update the code to use this macro where applicable.

- - - - -
f9638654 by Nicolas Trangez at 2022-11-02T12:06:48-04:00
rts: consistently use `STG_UNUSED`

- - - - -
81a58433 by Nicolas Trangez at 2022-11-02T12:06:48-04:00
rts: introduce (and use) `STG_USED`

Similar to `STG_UNUSED`, have a specific macro for
`__attribute__(used)`.

- - - - -
41e1f748 by Nicolas Trangez at 2022-11-02T12:06:48-04:00
rts: introduce (and use) `STG_MALLOC`

Instead of using `GNUC3_ATTRIBUTE(__malloc__)`, provide a `STG_MALLOC`
macro definition and use it instead.

- - - - -
3a9a8bde by Nicolas Trangez at 2022-11-02T12:06:48-04:00
rts: use `STG_UNUSED`

- - - - -
9ab999de by Nicolas Trangez at 2022-11-02T12:06:48-04:00
rts: specify deallocator of allocating functions

This patch adds a new `STG_MALLOC1` macro (and its counterpart
`STG_MALLOC2` for completeness) which allows to specify the deallocation
function to be used with allocations of allocating functions, and
applies it to `stg*allocBytes`.

It also fixes a case where `free` was used to free up an
`stgMallocBytes` allocation, found by the above change.

See: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-malloc-function-attribute
See: https://gitlab.haskell.org/ghc/ghc/-/issues/22381

- - - - -
81c0c7c9 by Nicolas Trangez at 2022-11-02T12:06:48-04:00
rts: use `alloc_size` attribute

This patch adds the `STG_ALLOC_SIZE1` and `STG_ALLOC_SIZE2` macros which
allow to set the `alloc_size` attribute on functions, when available.

See: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-alloc_005fsize-function-attribute
See: https://gitlab.haskell.org/ghc/ghc/-/issues/22381

- - - - -
99a1d896 by Nicolas Trangez at 2022-11-02T12:06:48-04:00
rts: add and use `STG_RETURNS_NONNULL`

See: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-returns_005fnonnull-function-attribute
See: https://gitlab.haskell.org/ghc/ghc/-/issues/22381

- - - - -
c235b399 by Nicolas Trangez at 2022-11-02T12:06:48-04:00
rts: tag `stgStrndup` as `STG_MALLOC`

See: https://gitlab.haskell.org/ghc/ghc/-/issues/22381

- - - - -
ed81b448 by Oleg Grenrus at 2022-11-02T12:07:27-04:00
Move Symbol implementation note out of public haddock

- - - - -
284fd39c by Ben Gamari at 2022-11-03T01:58:54-04:00
gen-dll: Drop it

Currently it is only used by the make build system, which is soon to be
retired, and it has not built since 41cf758b. We may need to reintroduce
it when dynamic-linking support is introduced on Windows, but we will
cross that bridge once we get there.

Fixes #21753.

- - - - -
24f4f54f by Matthew Pickering at 2022-11-03T01:59:30-04:00
Port foundation numeric tests to GHC testsuite

This commit ports the numeric tests which found a regression in GHC-9.4.

https://github.com/haskell-foundation/foundation/issues/571

Included in the commit is a simple random number generator and
simplified QuickCheck implementation. In future these could be factored
out of this standalone file and reused as a general purpose library
which could be used for other QuickCheck style tests in the testsuite.

See #22282

- - - - -
d51bf7bd by M Farkas-Dyck at 2022-11-03T02:00:13-04:00
git: ignore HIE files.

Cleans up git status if one sets -fwrite-ide-info in hadrian/ghci.

- - - - -
a9fc15b1 by Matthew Pickering at 2022-11-03T02:00:49-04:00
Clarify status of bindings in WholeCoreBindings

Gergo points out that these bindings are tidied, rather than prepd as
the variable claims. Therefore we update the name of the variable to
reflect reality and add a comment to the data type to try to erase any
future confusion.

Fixes #22307

- - - - -
634da448 by Bodigrim at 2022-11-03T21:25:02+00:00
Fix haddocks for GHC.IORef

- - - - -
31125154 by Andreas Klebinger at 2022-11-03T23:08:09-04:00
Export pprTrace and friends from GHC.Prelude.

Introduces GHC.Prelude.Basic which can be used in modules which are a
dependency of the ppr code.

- - - - -
a75727b5 by Simon Peyton Jones at 2022-11-04T10:26:51+00:00
Start work

Not ready for review

More progress

Wibbles

Stage1 compiles

More wibbles

More wibbles

More -- almost working

Comments

Wibbles

Wibbles

Wibble inlineId

Wibbles

Infinite loop somewhere

More wibbles.  Maybe can build stage2

Make FuNCo a thing by itself

Wibble

Wibble

Wibbles

Fix OptCoercion

Wibble

Wibble to optCoercion

Replace SORT with TYPE and CONSTRAINT

Wibble

Delete unused import

Delete TypeOrConstraint from ghc-prim:GHC.Types

Move from NthCo to SelCo

Wibbles

Wibbles in RepType

Wibble

Add mkWpEta

Really add mkWpEta

Wibble Typeable binds etc

Improve error messages

More wibbles, mainly to error messages

Wibbles

Wibbles to errors

Wibbles

But especially: treat Constraint as Typeable

More wibbles

More changes

* Move role into SelTyCon
* Get rid of mkTcSymCo and friends

Unused variable

Wibbles

Wibble

Accept error message changes

Refactoring...

Remove tc functions like tcKind, tcGetTyVar.

Move tyConsOfType, occCheckExpand to TyCo.FVs.

Introduce GHC.Core.TyCo.Compare

Lots of import changes!

Update haddock submodule (I hope)

Wibbles (notably: actually add GHC.Core.TyCo.Compare)

Wibbles

Wibble output of T16575

Wibbles

More wibbles

Remove infinite loop in T1946

See Note [ForAllTy and type equality]

Deal with rejigConRes

Needs a Note to be written by Richard

Some renaming

AnonArgFlag -->  FunTyFlag
ArgFlag     -->  ForAllTyFlag

Update haddock submodule

Rename TyCoBinder to ForAllTyBinder

Wibbles

Update haddock

Wibble

Update unix submodule

I think I accidentally got it out of sync with HEAD;
this puts it back.

Rename TyCoBinder to PiTyBinder

Update Haddock submodule

Wrap dictionaries in tuples

This fixes the kind bugs in arrow desugaring.  Needs some Notes,
but I want to try CI.

More on boxing data cons

Rebase and update GHC.Tc.Errors/GHC.Tc.Errors.Ppr

Revert accidental changes in SameOccInfo

fixes mod180, tcfail182

Wibbles in error messages

..plus eqType comes from GHC.Core.TyCo.Compare

Wibbles

More wibbles

Reaedy for RAE review

Fix fragile rule setup in GHC.Float

See Note [realToFrac natural-to-float]

Wibbles

More wibbles

Remove unused import

Remove another unused import

Wibbles

Update haddock submodule

Respond to Sam's suggestions

Wibbles

Wibbles

- - - - -
6b0e7625 by Simon Peyton Jones at 2022-11-04T10:26:51+00:00
Wibbles

- - - - -
55e4eb8f by Simon Peyton Jones at 2022-11-04T10:26:51+00:00
Unused import

- - - - -
9844ee90 by Simon Peyton Jones at 2022-11-04T10:26:51+00:00
Better boxingCon_maybe

- - - - -
0c3bc3bf by Richard Eisenberg at 2022-11-04T10:26:51+00:00
Improvements to comments, etc., from Richard

- - - - -
dbc126f4 by Simon Peyton Jones at 2022-11-04T10:26:51+00:00
Respond to Richard

- - - - -
9150cae0 by Simon Peyton Jones at 2022-11-04T10:26:51+00:00
Improve boxing-data-con API

- - - - -
48ba569e by Simon Peyton Jones at 2022-11-04T10:26:51+00:00
Update error messages

- - - - -
6ba4e04e by Richard Eisenberg at 2022-11-04T10:26:51+00:00
Fix the equality constraint problem

- - - - -
b410415f by Simon Peyton Jones at 2022-11-04T10:26:51+00:00
Wibbles

- - - - -
28949120 by Simon Peyton Jones at 2022-11-04T10:26:52+00:00
Add isCovertGadtDataCon, fixing build

- - - - -
2047d6c5 by Simon Peyton Jones at 2022-11-04T10:26:52+00:00
Wibbles

- - - - -
dd835def by Simon Peyton Jones at 2022-11-04T10:26:52+00:00
Wibbles

- - - - -
ed5bda6a by Simon Peyton Jones at 2022-11-04T10:26:52+00:00
Move RoughMatch code out of Unify into RoughMatch

- - - - -
f8b48b99 by Simon Peyton Jones at 2022-11-04T10:26:52+00:00
Wibble

- - - - -
6be878b1 by Simon Peyton Jones at 2022-11-04T10:26:52+00:00
Wibbles

- - - - -
87b7c12e by Simon Peyton Jones at 2022-11-04T10:26:52+00:00
Update haddock submodule again

- - - - -
f341ffa0 by Simon Peyton Jones at 2022-11-04T10:26:52+00:00
Wibbles, esp in RoughMap

- - - - -
ee015080 by Simon Peyton Jones at 2022-11-04T10:26:52+00:00
Upate haddock submodule

- - - - -
915aae7f by Simon Peyton Jones at 2022-11-04T10:26:52+00:00
Define eqType using tcEqType

A one-line change

- - - - -
d00a186b by Simon Peyton Jones at 2022-11-04T10:26:52+00:00
Revert "Define eqType using tcEqType"

This reverts commit eaf04c17c6a159ddb70eedd6fb8ab0b4fc180b7a.

Performance got worse!
   T18223 was 60% worse
   T8095      75%
   T12227  9%
   T13386  6%
   T15703  7%
   T5030   8%

- - - - -
adf43518 by Simon Peyton Jones at 2022-11-04T10:26:52+00:00
Refactor FunTyFlag

Mostly just renaming stuff

- - - - -
7c756700 by Simon Peyton Jones at 2022-11-04T10:26:52+00:00
Wibbles

- - - - -
5d5180c8 by Simon Peyton Jones at 2022-11-04T10:26:52+00:00
Wibble

- - - - -
482f8aed by Simon Peyton Jones at 2022-11-04T10:26:52+00:00
Add FunTyFlags to FunCo

- - - - -
a463d3ab by Simon Peyton Jones at 2022-11-04T10:26:52+00:00
More improvements

Hopefully perf improves a bit

Plus rep-poly/T13105 and rep-poly/T17536b are fixed.

- - - - -
43ee14d5 by Simon Peyton Jones at 2022-11-04T10:26:52+00:00
Add tests for #21530

- - - - -


19 changed files:

- .gitignore
- CODEOWNERS
- compiler/GHC.hs
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/Builtin/Types.hs-boot
- compiler/GHC/Builtin/Types/Literals.hs
- compiler/GHC/Builtin/Types/Prim.hs
- − compiler/GHC/Builtin/Types/Prim.hs-boot
- compiler/GHC/Builtin/Uniques.hs
- compiler/GHC/Cmm/Expr.hs
- compiler/GHC/CmmToAsm/BlockLayout.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/CmmToAsm/X86/Ppr.hs
- compiler/GHC/CmmToC.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Coercion.hs-boot
- compiler/GHC/Core/Coercion/Opt.hs
- compiler/GHC/Core/ConLike.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/073a65f42bb286dd46eab29a0287ea0bfd4d47cc...43ee14d598f1404d92e5ddbbb74ee265aca0733e

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/073a65f42bb286dd46eab29a0287ea0bfd4d47cc...43ee14d598f1404d92e5ddbbb74ee265aca0733e
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/20221104/9826e525/attachment-0001.html>


More information about the ghc-commits mailing list