[Git][ghc/ghc][wip/amg/warning-categories] 14 commits: Assorted changes to avoid Data.List.{head,tail}
Adam Gundry (@adamgundry)
gitlab at gitlab.haskell.org
Tue Jan 31 08:42:53 UTC 2023
Adam Gundry pushed to branch wip/amg/warning-categories at Glasgow Haskell Compiler / GHC
Commits:
2b62739d by Bodigrim at 2023-01-28T17:16:11-05:00
Assorted changes to avoid Data.List.{head,tail}
- - - - -
78c07219 by Cheng Shao at 2023-01-28T17:16:48-05:00
compiler: properly handle ForeignHints in the wasm NCG
Properly handle ForeignHints of ccall arguments/return value, insert
sign extends and truncations when handling signed subwords. Fixes #22852.
- - - - -
8bed166b by Ben Gamari at 2023-01-30T05:06:26-05:00
nativeGen: Disable asm-shortcutting on Darwin
Asm-shortcutting may produce relative references to symbols defined in
other compilation units. This is not something that MachO relocations
support (see #21972). For this reason we disable the optimisation on
Darwin. We do so without a warning since this flag is enabled by `-O2`.
Another way to address this issue would be to rather implement a
PLT-relocatable jump-table strategy. However, this would only benefit
Darwin and does not seem worth the effort.
Closes #21972.
- - - - -
da468391 by Cheng Shao at 2023-01-30T05:07:03-05:00
compiler: fix data section alignment in the wasm NCG
Previously we tried to lower the alignment requirement as far as
possible, based on the section kind inferred from the CLabel. For info
tables, .p2align 1 was applied given the GC should only need the
lowest bit to tag forwarding pointers. But this would lead to
unaligned loads/stores, which has a performance penalty even if the
wasm spec permits it. Furthermore, the test suite has shown memory
corruption in a few cases when compacting gc is used.
This patch takes a more conservative approach: all data sections
except C strings align to word size.
- - - - -
08ba8720 by Andreas Klebinger at 2023-01-30T21:18:45-05:00
ghc-the-library: Retain cafs in both static in dynamic builds.
We use keepCAFsForGHCi.c to force -fkeep-cafs behaviour by using a
__attribute__((constructor)) function.
This broke for static builds where the linker discarded the object file
since it was not reverenced from any exported code. We fix this by
asserting that the flag is enabled using a function in the same module
as the constructor. Which causes the object file to be retained by the
linker, which in turn causes the constructor the be run in static builds.
This changes nothing for dynamic builds using the ghc library. But causes
static to also retain CAFs (as we expect them to).
Fixes #22417.
-------------------------
Metric Decrease:
T21839r
-------------------------
- - - - -
20598ef6 by Ryan Scott at 2023-01-30T21:19:20-05:00
Handle `type data` properly in tyThingParent_maybe
Unlike most other data constructors, data constructors declared with `type data`
are represented in `TyThing`s as `ATyCon` rather than `ADataCon`. The `ATyCon`
case in `tyThingParent_maybe` previously did not consider the possibility of
the underlying `TyCon` being a promoted data constructor, which led to the
oddities observed in #22817. This patch adds a dedicated special case in
`tyThingParent_maybe`'s `ATyCon` case for `type data` data constructors to fix
these oddities.
Fixes #22817.
- - - - -
2f145052 by Ryan Scott at 2023-01-30T21:19:56-05:00
Fix two bugs in TypeData TH reification
This patch fixes two issues in the way that `type data` declarations were
reified with Template Haskell:
* `type data` data constructors are now properly reified using `DataConI`.
This is accomplished with a special case in `reifyTyCon`. Fixes #22818.
* `type data` type constructors are now reified in `reifyTyCon` using
`TypeDataD` instead of `DataD`. Fixes #22819.
- - - - -
d0f34f25 by Simon Peyton Jones at 2023-01-30T21:20:35-05:00
Take account of loop breakers in specLookupRule
The key change is that in GHC.Core.Opt.Specialise.specLookupRule
we were using realIdUnfolding, which ignores the loop-breaker
flag. When given a loop breaker, rule matching therefore
looped infinitely -- #22802.
In fixing this I refactored a bit.
* Define GHC.Core.InScopeEnv as a data type, and use it.
(Previously it was a pair: hard to grep for.)
* Put several functions returning an IdUnfoldingFun into
GHC.Types.Id, namely
idUnfolding
alwaysActiveUnfoldingFun,
whenActiveUnfoldingFun,
noUnfoldingFun
and use them. (The are all loop-breaker aware.)
- - - - -
de963cb6 by Matthew Pickering at 2023-01-30T21:21:11-05:00
ci: Remove FreeBSD job from release pipelines
We no longer attempt to build or distribute this release
- - - - -
f26d27ec by Matthew Pickering at 2023-01-30T21:21:11-05:00
rel_eng: Add check to make sure that release jobs are downloaded by fetch-gitlab
This check makes sure that if a job is a prefixed by "release-" then the
script downloads it and understands how to map the job name to the
platform.
- - - - -
7619c0b4 by Matthew Pickering at 2023-01-30T21:21:11-05:00
rel_eng: Fix the name of the ubuntu-* jobs
These were not uploaded for alpha1
Fixes #22844
- - - - -
68eb8877 by Matthew Pickering at 2023-01-30T21:21:11-05:00
gen_ci: Only consider release jobs for job metadata
In particular we do not have a release job for FreeBSD so the generation
of the platform mapping was failing.
- - - - -
b69461a0 by Jason Shipman at 2023-01-30T21:21:50-05:00
User's guide: Clarify overlapping instance candidate elimination
This commit updates the user's guide section on overlapping instance candidate
elimination to use "or" verbiage instead of "either/or" in regards to the
current pair of candidates' being overlappable or overlapping. "Either IX is
overlappable, or IY is overlapping" can cause confusion as it suggests "Either
IX is overlappable, or IY is overlapping, but not both".
This was initially discussed on this Discourse topic:
https://discourse.haskell.org/t/clarification-on-overlapping-instance-candidate-elimination/5677
- - - - -
4d31f9e2 by Adam Gundry at 2023-01-31T08:41:50+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.
- - - - -
30 changed files:
- .gitlab-ci.yml
- .gitlab/gen_ci.hs
- .gitlab/jobs.yaml
- .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py
- compiler/GHC.hs
- compiler/GHC/CmmToAsm.hs
- compiler/GHC/CmmToAsm/BlockLayout.hs
- compiler/GHC/CmmToAsm/Wasm/FromCmm.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Core/Rules.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/HsToCore/Pmc/Solver.hs
- compiler/GHC/JS/Make.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/StgToJS/Linker/Linker.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Gen/Splice.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a45f1d4731d7bde10cb206c94a84d46bcbb2f6f4...4d31f9e28f07af04db477ce7ac0c805727419e2c
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a45f1d4731d7bde10cb206c94a84d46bcbb2f6f4...4d31f9e28f07af04db477ce7ac0c805727419e2c
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/20230131/596f2b8b/attachment-0001.html>
More information about the ghc-commits
mailing list