[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 11 commits: Adjust and clarify handling of primop effects

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Aug 2 03:49:29 UTC 2023



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


Commits:
a6448484 by Matthew Craven at 2023-08-01T23:47:32-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.

- - - - -
edeef8aa by MorrowM at 2023-08-01T23:47:38-04:00
Add a RULE to make lookup fuse

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

Metric Increase:
    T18282

- - - - -
f93046ba by Ben Gamari at 2023-08-01T23:47:39-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.

- - - - -
54b8eee6 by Jaro Reinders at 2023-08-01T23:47:40-04:00
Native 32-bit Enum Int64/Word64 instances

This commits adds more performant Enum Int64 and Enum Word64 instances
for 32-bit platforms, replacing the Integer-based implementation.

These instances are a copy of the Enum Int and Enum Word instances with
minimal changes to manipulate Int64 and Word64 instead.

On i386 this yields a 1.5x performance increase and for the JavaScript
back end it even yields a 5.6x speedup.

Metric Decrease:
    T18964

- - - - -
5d98a491 by Sylvain Henry at 2023-08-01T23:47:51-04:00
JS: fix typos in constants (#23650)

- - - - -
bb2a0d9b by Josh Meredith at 2023-08-01T23:47:52-04:00
JavaScript: update MK_TUP macros to use current tuple constructors (#23659)

- - - - -
a69c7f79 by Matthew Pickering at 2023-08-01T23:47:53-04:00
ci: Pass -Werror when building hadrian in hadrian-ghc-in-ghci job

Warnings when building Hadrian can end up cluttering the output of HLS,
and we've had bug reports in the past about these warnings when building
Hadrian. It would be nice to turn on -Werror on at least one build of
Hadrian in CI to avoid a patch introducing warnings when building
Hadrian.

Fixes #23638

- - - - -
79640803 by Ben Gamari at 2023-08-01T23:47:53-04:00
codeGen: Ensure that TSAN is aware of writeArray# write barriers

By using a proper release store instead of a fence.

- - - - -
a93de317 by Ben Gamari at 2023-08-01T23:47:54-04:00
codeGen: Ensure that array reads have necessary barriers

This was the cause of #23541.

- - - - -
cd3e5dcd by jade at 2023-08-01T23:47:59-04:00
Expand documentation of List & Data.List

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

- - - - -
673a399f by Jade at 2023-08-01T23:48:03-04:00
Improve documentation of Semigroup & Monoid

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

- - - - -


24 changed files:

- .gitlab-ci.yml
- compiler/GHC/Builtin/PrimOps.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Core.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/StgToCmm/Prim.hs
- compiler/GHC/StgToJS/Linker/Utils.hs
- compiler/GHC/Types/Demand.hs
- compiler/Setup.hs
- hadrian/ghci-cabal.in
- hadrian/src/Oracles/Setting.hs
- hadrian/src/Rules/Generate.hs
- hadrian/src/Rules/Lint.hs
- hadrian/src/Settings/Builders/Cabal.hs
- hadrian/src/Settings/Builders/Common.hs
- hadrian/src/Settings/Builders/GenPrimopCode.hs
- hadrian/src/Settings/Builders/Ghc.hs
- hadrian/src/Settings/Packages.hs
- libraries/base/Data/List.hs
- libraries/base/Data/Monoid.hs


The diff was not included because it is too large.


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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7bf77c07446e40c8120d3f345af4b557e498b8dc...673a399f30d2375ee3a2d21e942f33427da20ad7
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/3307ba0e/attachment.html>


More information about the ghc-commits mailing list