[Git][ghc/ghc][wip/tsan/fixes] 36 commits: Allow WARNING pragmas to be controlled with custom categories

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Tue Apr 18 11:16:03 UTC 2023



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


Commits:
416cfc2f by Adam Gundry at 2023-04-14T10:19:58+00:00
Allow WARNING pragmas to be controlled with custom categories

Closes #17209. This implements GHC Proposal 541, allowing a WARNING
pragma to be annotated with a category like so:

    {-# WARNING in "x-partial" head "This function is undefined on empty lists." #-}

The user can then enable, disable and set the severity of such warnings
using command-line flags `-Wx-partial`, `-Werror=x-partial` and so on.  There
is a new warning group `-Wextended-warnings` containing all these warnings.
Warnings without a category are treated as if the category was `deprecations`,
and are (still) controlled by the flags `-Wdeprecations`
and `-Wwarnings-deprecations`.

Updates Haddock submodule.

- - - - -
a0118ecc by Adam Gundry at 2023-04-14T10:19:58+00:00
Move mention of warning groups change to 9.8.1 release notes

- - - - -
6cf9d8e7 by Ben Gamari at 2023-04-14T10:19:58+00:00
nativeGen/AArch64: Fix bitmask immediate predicate

Previously the predicate for determining whether a logical instruction
operand could be encoded as a bitmask immediate was far too
conservative. This meant that, e.g., pointer untagged required five
instructions whereas it should only require one.

Fixes #23030.

- - - - -
88896c2e by Joachim Breitner at 2023-04-14T10:19:58+00:00
User's guide: Improve docs for -Wall

previously it would list the warnings _not_ enabled by -Wall. That’s
unnecessary round-about and was out of date. So let's just name
the relevant warnings (based on `compiler/GHC/Driver/Flags.hs`).

- - - - -
967e1d37 by Li-yao Xia at 2023-04-14T10:19:58+00:00
base: Document GHC versions associated with past base versions in the changelog

- - - - -
2f1b29ed by Teo Camarasu at 2023-04-14T10:19:58+00:00
Add regression test for #17574

This test currently fails in the nonmoving way

- - - - -
984f5b4b by Teo Camarasu at 2023-04-14T10:19:58+00:00
fix: account for large and compact object stats with nonmoving gc

Make sure that we keep track of the size of large and compact objects that have been moved onto the nonmoving heap.
We keep track of their size and add it to the amount of live bytes in nonmoving segments to get the total size of the live nonmoving heap.

Resolves #17574

- - - - -
59c0d8c9 by David Feuer at 2023-04-14T10:19:58+00:00
Modify ThreadId documentation and comments

For a long time, `GHC.Conc.Sync` has said

```haskell
-- ToDo: data ThreadId = ThreadId (Weak ThreadId#)
-- But since ThreadId# is unlifted, the Weak type must use open
-- type variables.
```

We are now actually capable of using `Weak# ThreadId#`, but the
world has moved on. To support the `Show` and `Ord` instances, we'd
need to store the thread ID number in the `ThreadId`. And it seems
very difficult to continue to support `threadStatus` in that regime,
since it needs to be able to explain how threads died. In addition,
garbage collection of weak references can be quite expensive, and it
would be hard to evaluate the cost over he whole ecosystem. As discussed
in
[this CLC issue](https://github.com/haskell/core-libraries-committee/issues/125),
it doesn't seem very likely that we'll actually switch to weak
references here.

- - - - -
6fbe63ed by Bodigrim at 2023-04-14T10:19:58+00:00
Improve documentation of atomicModifyMutVar2#

- - - - -
1deb445d by Cheng Shao at 2023-04-14T10:19:58+00:00
rts: use performBlockingMajorGC in hs_perform_gc and fix ffi023

This patch does a few things:

- Add the missing RtsSymbols.c entry of performBlockingMajorGC
- Make hs_perform_gc call performBlockingMajorGC, which restores
  previous behavior
- Use hs_perform_gc in ffi023
- Remove rts_clearMemory() call in ffi023, it now works again in some
  test ways previously marked as broken. Fixes #23089

- - - - -
079ce35d by Cheng Shao at 2023-04-14T10:19:58+00:00
testsuite: add the rts_clearMemory test case

This patch adds a standalone test case for rts_clearMemory that mimics
how it's typically used by wasm backend users and ensures this RTS API
isn't broken by future RTS refactorings. Fixes #23901.

- - - - -
88723364 by Bodigrim at 2023-04-14T10:19:58+00:00
Improve documentation for resizing of byte arrays

- - - - -
5f54f18b by Ryan Scott at 2023-04-14T10:19:58+00:00
Add Eq/Ord instances for SSymbol, SChar, and SNat

This implements [CLC proposal #148](https://github.com/haskell/core-libraries-committee/issues/148).

- - - - -
ad752445 by David Feuer at 2023-04-14T10:19:58+00:00
Update and expand atomic modification Haddocks

* The documentation for `atomicModifyIORef` and `atomicModifyIORef'`
  were incomplete, and the documentation for `atomicModifyIORef` was
  out of date. Update and expand.

* Remove a useless lazy pattern match in the definition of
  `atomicModifyIORef`. The pair it claims to match lazily
  was already forced by `atomicModifyIORef2`.

- - - - -
b11d0785 by David Feuer at 2023-04-14T10:19:58+00:00
Document the constructor name for lists

Derived `Data` instances use raw infix constructor names when applicable.
The `Data.Data [a]` instance, if derived, would have a constructor name
of `":"`. However, it actually uses constructor name `"(:)"`. Document this
peculiarity.

See https://github.com/haskell/core-libraries-committee/issues/147

- - - - -
2beae1d3 by Simon Peyton Jones at 2023-04-14T10:19:58+00:00
Make exprIsConApp_maybe a bit cleverer

Addresses #23159.

See Note Note [Exploit occ-info in exprIsConApp_maybe]
in GHC.Core.SimpleOpt.

Compile times go down very slightly, but always go down,
never up.  Good!

Metrics: compile_time/bytes allocated
------------------------------------------------
 CoOpt_Singletons(normal)   -1.8%
           T15703(normal)   -1.2% GOOD

                geo. mean   -0.1%
                minimum     -1.8%
                maximum     +0.0%

Metric Decrease:
    CoOpt_Singletons
    T15703

- - - - -
ec5cc9e0 by Ryan Scott at 2023-04-14T10:19:58+00:00
Add COMPLETE pragmas to TypeRep, SSymbol, SChar, and SNat

This implements
[CLC proposal #149](https://github.com/haskell/core-libraries-committee/issues/149).

- - - - -
c4461053 by Ubuntu at 2023-04-14T10:19:58+00:00
Run script

- - - - -
127b885f by Ubuntu at 2023-04-14T10:19:58+00:00
Work around #22451

- - - - -
ab484414 by Ubuntu at 2023-04-14T10:19:58+00:00
Refine run script

- - - - -
0d4405f9 by Ben Gamari at 2023-04-14T10:19:58+00:00
CheckGC

- - - - -
f8b86712 by Ubuntu at 2023-04-14T10:19:58+00:00
llvm: Sequential consistency

- - - - -
07edf5ae by Ubuntu at 2023-04-14T10:19:58+00:00
C++ fixes

- - - - -
410fa293 by Ubuntu at 2023-04-14T10:19:58+00:00
rts: sequential consistency

- - - - -
caf48b62 by Ubuntu at 2023-04-14T10:19:59+00:00
check-gc: fix large objects

- - - - -
093145b7 by Ubuntu at 2023-04-14T10:19:59+00:00
check-gc on GC

- - - - -
e7664804 by Ubuntu at 2023-04-14T10:19:59+00:00
run

- - - - -
ece06e2d by Ubuntu at 2023-04-14T10:19:59+00:00
run

- - - - -
b151e731 by Ubuntu at 2023-04-14T10:19:59+00:00
run.sh: update

- - - - -
b86bc529 by Ubuntu at 2023-04-14T10:19:59+00:00
run: refactor

- - - - -
124184b0 by Ubuntu at 2023-04-17T21:04:47+00:00
Use C11 atomics

- - - - -
a109e4f5 by Ubuntu at 2023-04-17T21:05:03+00:00
Disable selector optimisation

- - - - -
5f3584a5 by Ubuntu at 2023-04-18T09:31:38+00:00
Fix thunk update further

- - - - -
fdeab17e by Ubuntu at 2023-04-18T10:53:15+00:00
Add acquire fence in WHITEHOLE

- - - - -
c1cfb5f8 by Ubuntu at 2023-04-18T10:53:42+00:00
whitespace

- - - - -
177d3681 by Ubuntu at 2023-04-18T10:53:48+00:00
Note

- - - - -


30 changed files:

- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToLlvm/CodeGen.hs
- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Driver/Config/Diagnostic.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/HaddockLex.x
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Types/Error.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Unit/Module/Warnings.hs
- compiler/GHC/Utils/Error.hs
- docs/users_guide/9.6.1-notes.rst
- docs/users_guide/9.8.1-notes.rst
- docs/users_guide/exts/pragmas.rst
- docs/users_guide/using-warnings.rst
- hadrian/src/Oracles/Setting.hs
- libraries/base/Data/Data.hs
- libraries/base/Data/IORef.hs
- libraries/base/Data/Typeable/Internal.hs
- libraries/base/GHC/Conc/Sync.hs
- libraries/base/GHC/IORef.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a4106472154c2f815129acb6149eab933bdc390c...177d368192b501e9ba016996e5e88f1bc3b2faf2

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a4106472154c2f815129acb6149eab933bdc390c...177d368192b501e9ba016996e5e88f1bc3b2faf2
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/20230418/ed621a3c/attachment-0001.html>


More information about the ghc-commits mailing list