[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 27 commits: JS: implement getMonotonicTime (fix #23687)

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Tue Aug 1 19:22:16 UTC 2023



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
33598ecb by Sylvain Henry at 2023-08-01T14:45:54-04:00
JS: implement getMonotonicTime (fix #23687)

- - - - -
d2bedffd by Bartłomiej Cieślar at 2023-08-01T14:46:40-04:00
Implementation of the Deprecated Instances proposal #575

This commit implements the ability to deprecate certain instances,
which causes the compiler to emit the desired deprecation message
whenever they are instantiated. For example:

  module A where
  class C t where
  instance {-# DEPRECATED "dont use" #-} C Int where

  module B where
  import A
  f :: C t => t
  f = undefined
  g :: Int
  g = f -- "dont use" emitted here

The implementation is as follows:
  - In the parser, we parse deprecations/warnings attached to instances:

      instance {-# DEPRECATED "msg" #-} Show X
      deriving instance {-# WARNING "msg2" #-} Eq Y

    (Note that non-standalone deriving instance declarations do not support
    this mechanism.)

  - We store the resulting warning message in `ClsInstDecl` (respectively, `DerivDecl`).
    In `GHC.Tc.TyCl.Instance.tcClsInstDecl` (respectively, `GHC.Tc.Deriv.Utils.newDerivClsInst`),
    we pass on that information to `ClsInst` (and eventually store it in `IfaceClsInst` too).

  - Finally, when we solve a constraint using such an instance, in
    `GHC.Tc.Instance.Class.matchInstEnv`, we emit the appropriate warning
    that was stored in `ClsInst`.
    Note that we only emit a warning when the instance is used in a different module
    than it is defined, which keeps the behaviour in line with the deprecation of
    top-level identifiers.

Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com>

- - - - -
d5a65af6 by Ben Gamari at 2023-08-01T14:47:18-04:00
compiler: Style fixes

- - - - -
7218c80a by Ben Gamari at 2023-08-01T14:47:19-04:00
rts: Fix implicit cast

This ensures that Task.h can be built with a C++ compiler.

- - - - -
d6d5aafc by Ben Gamari at 2023-08-01T14:47:19-04:00
testsuite: Fix warning in hs_try_putmvar001

- - - - -
d9eddf7a by Ben Gamari at 2023-08-01T14:47:19-04:00
testsuite: Add AtomicModifyIORef test

- - - - -
f9eea4ba by Ben Gamari at 2023-08-01T14:47:19-04:00
rts: Introduce NO_WARN macro

This allows fine-grained ignoring of warnings.

- - - - -
497b24ec by Ben Gamari at 2023-08-01T14:47:19-04:00
rts: Simplify atomicModifyMutVar2# implementation

Previously we would perform a redundant load in the non-threaded RTS in
atomicModifyMutVar2# implementation for the benefit of the non-moving
GC's write barrier. Eliminate this.

- - - - -
52ee082b by Ben Gamari at 2023-08-01T14:47:19-04:00
rts: Introduce more principled fence operations

- - - - -
cd3c0377 by Ben Gamari at 2023-08-01T14:47:19-04:00
rts: Introduce SET_INFO_RELAXED

- - - - -
6df2352a by Ben Gamari at 2023-08-01T14:47:19-04:00
rts: Style fixes

- - - - -
4ef6f319 by Ben Gamari at 2023-08-01T14:47:19-04:00
codeGen/tsan: Rework handling of spilling

- - - - -
f9ca7e27 by Ben Gamari at 2023-08-01T14:47:19-04:00
hadrian: More debug information

- - - - -
df4153ac by Ben Gamari at 2023-08-01T14:47:19-04:00
Improve TSAN documentation

- - - - -
fecae988 by Ben Gamari at 2023-08-01T14:47:19-04:00
hadrian: More selective TSAN instrumentation

- - - - -
465a9a0b by Alan Zimmerman at 2023-08-01T14:47:56-04:00
EPA: Provide correct annotation span for ImportDecl

Use the whole declaration, rather than just the span of the 'import'
keyword.

Metric Decrease:
   T9961
   T5205
Metric Increase:
  T13035

- - - - -
ae63d0fa by Bartłomiej Cieślar at 2023-08-01T14:48:40-04:00
Add cases to T23279: HasField for deprecated record fields

This commit adds additional tests from ticket #23279 to ensure that we don't
regress on reporting deprecated record fields in conjunction with HasField,
either when using overloaded record dot syntax or directly through `getField`.

Fixes #23279

- - - - -
00fb6e6b by Andreas Klebinger at 2023-08-01T14:49:17-04:00
AArch NCG: Pure refactor

Combine some alternatives. Add some line breaks for overly long lines

- - - - -
8f3b3b78 by Andreas Klebinger at 2023-08-01T14:49:54-04:00
Aarch ncg: Optimize immediate use for address calculations

When the offset doesn't fit into the immediate we now just reuse the
general getRegister' code path which is well optimized to compute the
offset into a register instead of a special case for CmmRegOff.

This means we generate a lot less code under certain conditions which is
why performance metrics for these improve.

-------------------------
Metric Decrease:
    T4801
    T5321FD
    T5321Fun
-------------------------

- - - - -
a8e8f3d3 by Matthew Craven at 2023-08-01T15:21:36-04:00
Adjust and clarify handling of primop effects

The existing "can_fail" and "has_side_effects" primop attributes that
previously governed this were used in inconsistent and confusingly-
documented ways, especially with regard to raising exceptions.  This
patch replaces them with a single "effect" attribute, with four
possible values (NoEffect, CanFail, ThrowsException, ReadWriteEffect)
as described in Note [Classifying primop effects].

A substantial amount of related documentation has been re-drafted for
clarity and accuracy.

In the process of making this attribute format change for literally
every primop, several existing mis-classifications were detected and
corrected.

New primop attributes "cheap" and "work_free" were
also added, and used in the obvious places.

In view of their actual meaning and uses, `primOpOkForSideEffects` and
`exprOkForSideEffects` have been renamed to `primOpOkToDiscard` and
`exprOkToDiscard`, respectively.

- - - - -
45de1ada by MorrowM at 2023-08-01T15:21:41-04:00
Add a RULE to make lookup fuse

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

Metric Increase:
    T18282

- - - - -
363cb69a by Ben Gamari at 2023-08-01T15:21:42-04:00
hadrian: Ensure that way-flags are passed to CC

Previously the way-specific compilation flags (e.g. `-DDEBUG`,
`-DTHREADED_RTS`) would not be passed to the CC invocations. This meant
that C dependency files would not correctly reflect
dependencies predicated on the way, resulting in the rather
painful #23554.

Closes #23554.

- - - - -
7cbbbcb6 by Sylvain Henry at 2023-08-01T15:21:46-04:00
JS: fix typos in constants (#23650)

- - - - -
ba551ce3 by Ben Gamari at 2023-08-01T15:21:46-04:00
codeGen: Ensure that TSAN is aware of writeArray# write barriers

By using a proper release store instead of a fence.

- - - - -
9cc6693b by Ben Gamari at 2023-08-01T15:21:47-04:00
codeGen: Ensure that array reads have necessary barriers

This was the cause of #23541.

- - - - -
c441297f by jade at 2023-08-01T15:21:53-04:00
Expand documentation of List & Data.List

This commit aims to improve the documentation and examples
of symbols exported from Data.List

- - - - -
7bf77c07 by Jade at 2023-08-01T15:21:56-04:00
Improve documentation of Semigroup & Monoid

This commit aims to improve the documentation of various symbols
exported from Data.Semigroup and Data.Monoid

- - - - -


18 changed files:

- compiler/GHC/Builtin/PrimOps.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/Cmm/ThreadSanitizer.hs
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/InstEnv.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/Opt/FloatIn.hs
- compiler/GHC/Core/Opt/SetLevels.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Utils.hs
- compiler/GHC/Hs.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/ImpExp.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/IfaceToCore.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/89abe72eaefa11aa6175e565b602b7e87b8b01ee...7bf77c07446e40c8120d3f345af4b557e498b8dc

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/89abe72eaefa11aa6175e565b602b7e87b8b01ee...7bf77c07446e40c8120d3f345af4b557e498b8dc
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/20230801/a92b0863/attachment-0001.html>


More information about the ghc-commits mailing list