[Git][ghc/ghc][wip/T17605] 15 commits: Fix `instance Bounded a => Bounded (Down a)` (#18716)

Ben Gamari gitlab at gitlab.haskell.org
Wed Oct 28 13:50:57 UTC 2020



Ben Gamari pushed to branch wip/T17605 at Glasgow Haskell Compiler / GHC


Commits:
9ad51bc9 by David Beacham at 2020-10-27T13:59:35-04:00
Fix `instance Bounded a => Bounded (Down a)` (#18716)

* Flip `minBound` and `maxBound` to respect the change in ordering
* Remove awkward `Enum` (and hence `Integral`) instances for
  `Data.Ord.Down`
* Update changelog

- - - - -
eedec53d by Vladislav Zavialov at 2020-10-27T14:00:11-04:00
Version bump: base-4.16 (#18712)

Also bumps upper bounds on base in boot libraries (incl. submodules).

- - - - -
412018c1 by Tamar Christina at 2020-10-27T14:00:49-04:00
winio: simplify logic remove optimization step.

- - - - -
4950dd07 by Ben Gamari at 2020-10-27T14:01:24-04:00
hadrian: Suppress xelatex output unless it fails

As noted in #18835, xelatex produces an absurd amount of output, nearly
all of which is meaningless. Silence this.

Fixes #18835.

- - - - -
f3d8ab2e by Ben Gamari at 2020-10-27T14:02:00-04:00
build system: Clean mingw tarballs

Tamar noticed in !4293 that the build systems fail to clean up the mingw
tarballs directory (`ghc-tarballs`). Fix this in both the make build
system and Hadrian.

- - - - -
0b3d23af by Simon Peyton Jones at 2020-10-27T14:02:34-04:00
Fix two constraint solving problems

This patch fixes two problems in the constraint solver.

* An actual bug #18555: we were floating out a constraint to eagerly,
  and that was ultimately fatal.  It's explained in
  Note [Do not float blocked constraints] in GHC.Core.Constraint.

  This is all very delicate, but it's all going to become irrelevant
  when we stop floating constraints (#17656).

* A major performance infelicity in the flattener.  When flattening
  (ty |> co) we *never* generated Refl, even when there was nothing
  at all to do.  Result: we would gratuitously rewrite the constraint
  to exactly the same thing, wasting work.  Described in #18413, and
  came up again in #18855.

  Solution: exploit the special case by calling the new function
  castCoercionKind1.  See Note [castCoercionKind1] in
  GHC.Core.Coercion

- - - - -
f76c5a08 by Sergei Trofimovich at 2020-10-27T14:03:14-04:00
ghc.mk: amend 'make sdist'

Noticed 'make sdist' failure seen as:

```
"rm" -rf sdistprep/ghc/ghc-9.1.0.20201020/hadrian/_build/ (SRC_DIST_GHC_DIR)/hadrian/dist-newstyle/
/bin/sh: -c: line 0: syntax error near unexpected token `('
```

commit 9657f6f34
("sdist: Include hadrian sources in source distribution")
added a new cleanup path without a variable expantion.

The change adds variable reference. While at it move directory
cleanup to a separate statement.

Amends #18794

Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>

- - - - -
78b52c88 by David Eichmann at 2020-10-27T14:03:51-04:00
Use config.run_ways for multi_compile_and_run tests

- - - - -
e3fdd419 by Alan Zimmerman at 2020-10-27T14:04:26-04:00
Api Annotations: Introduce AnnPercent for HsExplicitMult

For the case

  foo :: a %p -> b

The location of the '%' is captured, separate from the 'p'

- - - - -
d2a25f42 by Ben Gamari at 2020-10-27T14:05:02-04:00
gitlab-ci: Bump ci-images

Bumps bootstrap compiler to 8.10.1.

- - - - -
28f98b01 by Sebastian Graf at 2020-10-27T14:05:37-04:00
DmdAnal: Kill `is_thunk` case in `splitFV`

The `splitFV` function implements the highly dubious hack
described in `Note [Lazy und unleashable free variables]` in
GHC.Core.Opt.DmdAnal. It arranges it so that demand signatures only
carry strictness info on free variables. Usage info is released through
other means, see the Note. It's purely for analysis performance reasons.

It turns out that `splitFV` has a quite involved case for thunks that
produces slightly different usage signatures and it's not clear why we
need it: `splitFV` is only relevant in the LetDown case and the only
time we call it on thunks is for top-level or local recursive thunks.

Since usage signatures of top-level thunks can only reference other
top-level bindings and we completely discard demand info we have on
top-level things (see the lack of `setIdDemandInfo` in
`dmdAnalTopBind`), the `is_thunk` case is completely irrelevant here.

For local, recursive thunks, the added benefit of the `is_thunk` test
is marginal: We get used-multiple-times in some cases where previously
we had used-once if a recursive thunk has multiple call sites. It's
very unlikely and not a case to optimise for.

So we kill the `is_thunk` case and inline `splitFV` at its call site,
exposing `isWeakDmd` from `GHC.Types.Demand` instead.

The NoFib summary supports this decision:

```
            Min           0.0%     -0.0%
            Max           0.0%     +0.0%
 Geometric Mean          -0.0%     -0.0%
```

- - - - -
d8b1e365 by Ben Gamari at 2020-10-28T09:50:49-04:00
nativeGen/dwarf: Fix procedure end addresses

Previously the `.debug_aranges` and `.debug_info` (DIE) DWARF
information would claim that procedures (represented with a
`DW_TAG_subprogram` DIE) would only span the range covered by their entry
block. This omitted all of the continuation blocks (represented by
`DW_TAG_lexical_block` DIEs), confusing `perf`. Fix this by introducing
a end-of-procedure label and using this as the `DW_AT_high_pc` of
procedure `DW_TAG_subprogram` DIEs

Fixes #17605.

- - - - -
dc47f7b6 by Ben Gamari at 2020-10-28T09:50:49-04:00
nativeGen/dwarf: Only produce DW_AT_source_note DIEs in -g3

Standard debugging tools don't know how to understand these so let's not
produce them unless asked.

- - - - -
e8257006 by Ben Gamari at 2020-10-28T09:50:49-04:00
nativeGen/dwarf: Use DW_AT_linkage instead of DW_AT_MIPS_linkage

- - - - -
3263780f by Ben Gamari at 2020-10-28T09:50:49-04:00
gitlab-ci: Add DWARF release jobs for Debian 10, Fedora27

- - - - -


30 changed files:

- .gitlab-ci.yml
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/CmmToAsm.hs
- compiler/GHC/CmmToAsm/Config.hs
- compiler/GHC/CmmToAsm/Dwarf.hs
- compiler/GHC/CmmToAsm/Dwarf/Constants.hs
- compiler/GHC/CmmToAsm/Dwarf/Types.hs
- compiler/GHC/CmmToAsm/X86/Ppr.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/FamInstEnv.hs
- compiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Core/Unify.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Tc/Solver.hs
- compiler/GHC/Tc/Solver/Flatten.hs
- compiler/GHC/Types/Demand.hs
- compiler/ghc.cabal.in
- docs/users_guide/debug-info.rst
- ghc.mk
- hadrian/hadrian.cabal
- hadrian/src/Builder.hs
- hadrian/src/Rules/Clean.hs
- libraries/array
- libraries/base/Data/Ord.hs
- libraries/base/GHC/Event/Windows.hsc
- libraries/base/base.cabal
- libraries/base/changelog.md


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1fac3b522979a24f67a639d749ccbfbd799cdff2...3263780f03ca82310f8ff2ef4376cb743730f2dd

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1fac3b522979a24f67a639d749ccbfbd799cdff2...3263780f03ca82310f8ff2ef4376cb743730f2dd
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/20201028/62f2824d/attachment-0001.html>


More information about the ghc-commits mailing list