[Git][ghc/ghc][wip/backports-9.8] 17 commits: Second fix to #24083

Zubin (@wz1000) gitlab at gitlab.haskell.org
Thu Feb 8 14:36:55 UTC 2024



Zubin pushed to branch wip/backports-9.8 at Glasgow Haskell Compiler / GHC


Commits:
7c5700b0 by Simon Peyton Jones at 2024-02-08T20:06:43+05:30
Second fix to #24083

My earlier fix turns out to be too aggressive for data/type families

See wrinkle (DTV1) in Note [Disconnected type variables]

(cherry picked from commit 2776920e642544477a38d0ed9205d4f0b48a782e)
(cherry picked from commit 110efc9813ba5f68668ab7fc3f95b9febca52880)

- - - - -
0c34621b by Matthew Pickering at 2024-02-08T20:06:43+05:30
libraries: Bump filepath to 1.4.200.1 and unix to 2.8.4.0

Updates filepath submodule
Updates unix submodule

Fixes #24240

(cherry picked from commit 36b9a38cc45a26865c4e45f4949e519a5dede76d)

- - - - -
74866e2a by Matthew Pickering at 2024-02-08T20:06:43+05:30
Submodule linter: Allow references to tags

We modify the submodule linter so that if the bumped commit is a
specific tag then the commit is accepted.

Fixes #24241

(cherry picked from commit 91ff0971df64b04938d011fe1562320c5d90849a)

- - - - -
58f2b8c3 by Matthew Craven at 2024-02-08T20:06:43+05:30
Fix loopification in the presence of void arguments

This also removes Note [Void arguments in self-recursive tail calls],
which was just misleading.  It's important to count void args both
in the function's arity and at the call site.

Fixes #24295.

(cherry picked from commit ae9cc1a84c9f470b77d98423400e6dfa95b2449b)

- - - - -
a0c2d432 by Andreas Klebinger at 2024-02-08T20:06:43+05:30
Aarch64: Enable -mfma by default.

Fixes #24311

(cherry picked from commit 7e95f738620dc805868d198f980e1bdd53e27a2d)

- - - - -
fdf219b4 by Matthew Pickering at 2024-02-08T20:06:43+05:30
eventlog: Fix off-by-one error in postIPE

We were missing the extra_comma from the calculation of the size of the
payload of postIPE. This was causing assertion failures when the event
would overflow the buffer by one byte, as ensureRoomForVariable event
would report there was enough space for `n` bytes but then we would
write `n + 1` bytes into the buffer.

Fixes #24287

(cherry picked from commit 5776008c7a5581193c3e72e59451ad49abac9d81)

- - - - -
02edf92b by Jade at 2024-02-08T20:06:43+05:30
Enhance Documentation of functions exported by Data.Function

This patch aims to improve the documentation of functions exported
in Data.Function

Tracking: #17929
Fixes: #10065
(cherry picked from commit 1fa1c00c95325761a5aa914af53d71ba5e7072b3)

- - - - -
2038786d by Jade at 2024-02-08T20:06:43+05:30
Improve documentation of hGetLine.

- Add explanation for whether a newline is returned
- Add examples

Fixes #14804

(cherry picked from commit ab47a43d64f6b7d4fc181645171c31ba2db1eebe)

- - - - -
7d93ff0f by sheaf at 2024-02-08T20:06:43+05:30
Fix FMA instruction on LLVM

We were emitting the wrong instructions for fused multiply-add
operations on LLVM:

  - the instruction name is "llvm.fma.f32" or "llvm.fma.f64", not "fmadd"
  - LLVM does not support other instructions such as "fmsub"; instead
    we implement these by flipping signs of some arguments
  - the instruction is an LLVM intrinsic, which requires handling it
    like a normal function call instead of a machine instruction

Fixes #24223

(cherry picked from commit a40f4ab21bcc088e63892cd5e85edbec20d3fc69)

- - - - -
6c0dec25 by Hécate Moonlight at 2024-02-08T20:06:43+05:30
Clarification for newtype constructors when using `coerce`

(cherry picked from commit 699da01bbbf3e42c7d38b9cfe443dd0e8e256342)

- - - - -
b6f7c9a1 by Andreas Klebinger at 2024-02-08T20:06:43+05:30
Fix fma warning when using llvm on aarch64.

On aarch64 fma is always on so the +fma flag doesn't exist for that
target. Hence no need to try and pass +fma to llvm.

Fixes #24379

(cherry picked from commit 9294a08643b89509a0e0957cb73c186a39d4f3db)

- - - - -
0493031b by Patrick at 2024-02-08T20:06:43+05:30
Fix bug wrong span of nested_doc_comment #24378

close #24378
1. Update the start position of span in `nested_doc_comment` correctly.
and hence the spans of identifiers of haddoc can be computed correctly.
2. add test `HaddockSpanIssueT24378`.

(cherry picked from commit 8eeadfad3a0035f8c5b339782676ff23572e0e5e)

- - - - -
58dc1e2e by sheaf at 2024-02-08T20:06:43+05:30
No shadowing warnings for NoFieldSelector fields

This commit ensures we don't emit shadowing warnings when a user
shadows a field defined with NoFieldSelectors.

Fixes #24381

(cherry picked from commit ced2e7312b692e3f5402e4db6cfec390653a6a06)

- - - - -
9d084532 by Teo Camarasu at 2024-02-08T20:06:43+05:30
doc: Add -Dn flag to user guide

Resolves #24394

(cherry picked from commit 94ce031ddc84ee702c12a11793028ef21e65fa00)

- - - - -
31dee09f by Rodrigo Mesquita at 2024-02-08T20:06:43+05:30
Work around autotools setting C11 standard in CC/CXX

In autoconf >=2.70, C11 is set by default for $CC and $CXX via the
-std=...11 flag. In this patch, we split the "-std" flag out of the $CC
and $CXX variables, which we traditionally assume to be just the
executable name/path, and move it to $CFLAGS/$CXXFLAGS instead.

Fixes #24324

(cherry picked from commit cdddeb0f1280b40cc194028bbaef36e127175c4c)

- - - - -
0ae8a14e by Zubin Duggal at 2024-02-08T20:06:43+05:30
driver: Really don't lose track of nodes when we fail to resolve cycles

This fixes a bug in 8db8d2fd1c881032b1b360c032b6d9d072c11723, where we could lose
track of acyclic components at the start of an unresolved cycle. We now ensure we
never loose track of any of these components.

As T24275 demonstrates, a "cyclic" SCC might not really be a true SCC:

When viewed without boot files, we have a single SCC

```
[REC main:T24275B [main:T24275B {-# SOURCE #-},
                   main:T24275A {-# SOURCE #-}]
     main:T24275A [main:T24275A {-# SOURCE #-}]]
```

But with boot files this turns into

```
[NONREC main:T24275B {-# SOURCE #-} [],
 REC main:T24275B [main:T24275B {-# SOURCE #-},
                   main:T24275A {-# SOURCE #-}]
    main:T24275A {-# SOURCE #-} [main:T24275B],
 NONREC main:T24275A [main:T24275A {-# SOURCE #-}]]
```

Note that this is truly not an SCC, as no nodes are reachable from T24275B.hs-boot.
However, we treat this entire group as a single "SCC" because it seems so when we
analyse the graph without taking boot files into account.

Indeed, we must return a single ResolvedCycle element in the BuildPlan for this
as described in Note [Upsweep].

However, since after resolving this is not a true SCC anymore, `findCycle` fails
to find a cycle and we have a sub-optimal error message as a result.

To handle this, I extended `findCycle` to not assume its input is an SCC, and to
try harder to find cycles in its input.

Fixes #24275

(cherry picked from commit 532993c8160d960f848e7abd401774b6879e3ee8)

- - - - -
57dae38a by Matthew Pickering at 2024-02-08T20:06:43+05:30
distrib/configure: Fix typo in CONF_GCC_LINKER_OPTS_STAGE2 variable

Instead we were setting CONF_GCC_LINK_OPTS_STAGE2 which meant that we
were missing passing `--target` when invoking the linker.

Fixes #24414

(cherry picked from commit d309f4e7e37f3795c6d6b150c407d5a9b332854e)

- - - - -


30 changed files:

- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/CmmToLlvm/CodeGen.hs
- compiler/GHC/Data/Graph/Directed.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Llvm/Ppr.hs
- compiler/GHC/Llvm/Syntax.hs
- compiler/GHC/Parser/Lexer.x
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/StgToCmm/Bind.hs
- compiler/GHC/StgToCmm/Closure.hs
- compiler/GHC/StgToCmm/Expr.hs
- compiler/GHC/StgToCmm/Heap.hs
- compiler/GHC/StgToCmm/Monad.hs
- compiler/GHC/StgToCmm/Sequel.hs
- compiler/GHC/Tc/Gen/HsType.hs
- configure.ac
- distrib/configure.ac.in
- docs/users_guide/runtime_control.rst
- docs/users_guide/using.rst
- libraries/base/Data/Function.hs
- libraries/base/GHC/Base.hs
- libraries/base/GHC/IO/Handle/Text.hs
- libraries/filepath
- libraries/unix
- linters/lint-submodule-refs/Main.hs
- linters/linters-common/Linters/Common.hs
- + m4/fp_prog_move_to_flags.m4
- rts/eventlog/EventLog.c


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/269a32fdd101f5c2016a0cd42f6fc64916af9ea7...57dae38abc976eca2f432d6f2a14823f27123876

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/269a32fdd101f5c2016a0cd42f6fc64916af9ea7...57dae38abc976eca2f432d6f2a14823f27123876
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/20240208/73f00f51/attachment-0001.html>


More information about the ghc-commits mailing list