[Git][ghc/ghc][ghc-9.8] 25 commits: refactor quadratic search in warnMissingHomeModules
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Fri Oct 4 11:01:40 UTC 2024
Ben Gamari pushed to branch ghc-9.8 at Glasgow Haskell Compiler / GHC
Commits:
2459880b by Torsten Schmits at 2024-09-30T10:01:24-04:00
refactor quadratic search in warnMissingHomeModules
(cherry picked from commit bc672166acd8f2815d58b6d214e69373abec4486)
- - - - -
e3007eea by Simon Peyton Jones at 2024-09-30T10:19:37-04:00
Track in-scope variables in ruleCheckProgram
This small patch fixes #24726, by tracking in-scope variables
properly in -drule-check. Not hard to do!
(cherry picked from commit be1e60eec0ec37da41643af17d78c698ab2a7083)
- - - - -
d3e48ec3 by Simon Peyton Jones at 2024-09-30T10:19:38-04:00
Add a couple more HasCallStack constraints in SimpleOpt
Just for debugging, no effect on normal code
(cherry picked from commit 58408c77f126e685969756d30e050d308fea3786)
- - - - -
f330b422 by Simon Peyton Jones at 2024-09-30T10:29:29-04:00
Use HasDebugCallStack, rather than HasCallStack
(cherry picked from commit e56871861c8a531feaa1a24e37fb56ba6c8cc690)
- - - - -
7fed4765 by Simon Peyton Jones at 2024-09-30T14:15:22-04:00
Don't generate wrappers for `type data` constructors with StrictData
Previously, the logic for checking if a data constructor needs a wrapper or not
would take into account whether the constructor's fields have explicit
strictness (e.g., `data T = MkT !Int`), but the logic would _not_ take into
account whether `StrictData` was enabled. This meant that something like `type
data T = MkT Int` would incorrectly generate a wrapper for `MkT` if
`StrictData` was enabled, leading to the horrible errors seen in #24620. To fix
this, we disable generating wrappers for `type data` constructors altogether.
Fixes #24620.
Co-authored-by: Ryan Scott <ryan.gl.scott at gmail.com>
(cherry picked from commit 5e4f4ba835fd24135759ee7a2d0d5c636a8a1505)
- - - - -
491ec3a9 by Andreas Klebinger at 2024-09-30T14:15:43-04:00
NCG: Fix a bug where we errounously removed a required jump instruction.
Add a new method to the Instruction class to check if we can eliminate a
jump in favour of fallthrough control flow.
Fixes #24507
(cherry picked from commit 0fe2b410ac0d8951f07ffcc9f3c6c97bc312df48)
- - - - -
692474e0 by Matthew Pickering at 2024-09-30T14:16:08-04:00
Fix off by one error in seekBinNoExpand and seekBin
(cherry picked from commit 28009fbc26e4aca7a3b05cedb60c5c9baa31223d)
- - - - -
ddf9da28 by Ben Gamari at 2024-09-30T14:16:54-04:00
Fix type of _get_osfhandle foreign import
Fixes #24601.
(cherry picked from commit f8f384a8cc7212284379d109f6dc78c6188f3f18)
- - - - -
bcdf3e2c by Sylvain Henry at 2024-09-30T16:10:28-04:00
JS: reenable h$appendToHsString optimization (#24495)
The optimization introducing h$appendToHsString wasn't kicking in
anymore (while it did in 9.8.1) because of the changes introduced in #23270 (7e0c8b3bab30).
This patch reenables the optimization by matching on case-expression, as
done in Cmm for unpackCString# standard thunks.
The test is also T24495 added in the next commits (two commits for ease
of backporting to 9.8).
(cherry picked from commit b36ee57bfbecc628b7f0919e1e59b7066495034f)
- - - - -
e16be40c by Luite Stegeman at 2024-09-30T16:10:28-04:00
Update correct counter in bumpTickyAllocd
(cherry picked from commit 0c4a96862081f03e2946a2ed7e80c108f06205a1)
- - - - -
10a6aa18 by Rodrigo Mesquita at 2024-09-30T16:10:28-04:00
configure: Use LDFLAGS when trying linkers
A user may configure `LDFLAGS` but not `LD`. When choosing a linker, we
will prefer `ldd`, then `ld.gold`, then `ld.bfd` -- however, we have to
check for a working linker. If either of these fail, we try the next in
line.
However, we were not considering the `$LDFLAGS` when checking if these
linkers worked. So we would pick a linker that does not support the
current $LDFLAGS and fail further down the line when we used that linker
with those flags.
Fixes #24565, where `LDFLAGS=-Wl,-z,pack-relative-relocs` is not
supported by `ld.gold` but that was being picked still.
(cherry picked from commit 32a8103f3b3e22907fdd67b69c919c5251d8cc20)
- - - - -
067aa6e0 by Zubin Duggal at 2024-09-30T16:10:28-04:00
driver: Make `checkHomeUnitsClosed` faster
The implementation of `checkHomeUnitsClosed` was traversing every single path
in the unit dependency graph - this grows exponentially and quickly grows to be
infeasible on larger unit dependency graphs.
Instead we replace this with a faster implementation which follows from the
specificiation of the closure property - there is a closure error if there are
units which are both are both (transitively) depended upon by home units and
(transitively) depend on home units, but are not themselves home units.
To compute the set of units required for closure, we first compute the closure
of the unit dependency graph, then the transpose of this closure, and find all
units that are reachable from the home units in the transpose of the closure.
(cherry picked from commit a933aff37992ea311a60be878379e7abf650e9fb)
- - - - -
b0a30ae7 by Cheng Shao at 2024-09-30T16:10:28-04:00
rts: fix clang compilation on aarch64
This patch fixes function prototypes in ARMOutlineAtomicsSymbols.h
which causes "error: address argument to atomic operation must be a
pointer to _Atomic type" when compiling with clang on aarch64.
(cherry picked from commit 7db8c9927fae3369fc4ecff68f80c4cb32eea757)
- - - - -
ad7b46e7 by Cheng Shao at 2024-09-30T16:10:28-04:00
libffi-tarballs: bump libffi-tarballs submodule to libffi 3.4.6
This commit bumps the libffi-tarballs submodule to libffi 3.4.6, which
includes numerous upstream libffi fixes, especially
https://github.com/libffi/libffi/issues/760.
(cherry picked from commit 810660b780e1111b36c91326bcd0041e1f62706b)
- - - - -
66148140 by Teo Camarasu at 2024-09-30T16:10:28-04:00
rts: avoid checking bdescr of value outside of Haskell heap
In nonmovingTidyWeaks we want to check if the key of a weak pointer
lives in the non-moving heap. We do this by checking the flags of the
block the key lives in. But we need to be careful with values that live
outside the Haskell heap, since they will lack a block descriptor and
looking for one may lead to a segfault. In this case we should just
accept that it isn't on the non-moving heap.
Resolves #24492
(cherry picked from commit 74b24a9b0084459b8aa426a502956bd332b4d0fb)
- - - - -
894710fb by Rodrigo Mesquita at 2024-09-30T16:10:28-04:00
configure: Do not override existing linker flags in FP_LD_NO_FIXUP_CHAINS
(cherry picked from commit 9460d5044b8c7239fb7a6ce875d084617f159c7f)
- - - - -
5b3dc9c4 by Zubin Duggal at 2024-09-30T16:10:28-04:00
rel-eng/fetch-gitlab.py: Fix name of aarch64 alpine 3_18 release job
(cherry picked from commit f3de8a3c6f25b2c7eeb2ec6da95be24eeb496914)
- - - - -
98b04cea by Andreas Klebinger at 2024-09-30T16:10:28-04:00
x86-ncg: Fix fma codegen when arguments are globals
Fix a bug in the x86 ncg where results would be wrong when the desired output
register and one of the input registers were the same global.
Also adds a tiny optimization to make use of the memory addressing
support when convenient.
Fixes #24496
(cherry picked from commit 82ccb8012ba532f0fa06dc6ff96d33217560088a)
- - - - -
69ed198f by Ian-Woo Kim at 2024-09-30T16:10:28-04:00
Add missing BCO handling in scavenge_one.
(cherry picked from commit 902ebcc2b95707319d37a19d6b23c342cc14b162)
- - - - -
db376284 by Matthew Craven at 2024-09-30T16:10:28-04:00
Add @since annotation to Data.Data.mkConstrTag
(cherry picked from commit 249caf0d2345ac2e6046847522bb8f2fff7f8835)
- - - - -
2c18ff79 by Vladislav Zavialov at 2024-09-30T16:10:28-04:00
Fix (~) and (@) infix operators in TH splices (#23748)
8168b42a "Whitespace-sensitive bang patterns" allows GHC to accept
the following infix operators:
a ~ b = ()
a @ b = ()
But not if TH is used to generate those declarations:
$([d| a ~ b = ()
a @ b = ()
|])
-- Test.hs:5:2: error: [GHC-55017]
-- Illegal variable name: ‘~’
-- When splicing a TH declaration: (~_0) a_1 b_2 = GHC.Tuple.Prim.()
This is easily fixed by modifying `reservedOps` in GHC.Utils.Lexeme
(cherry picked from commit 46fd8ced0cc031f2e50a1a4b348738fd39b4a741)
- - - - -
c6a95d27 by Jade at 2024-09-30T16:10:29-04:00
Enhance documentation of Data.Complex
(cherry picked from commit cdd939e77f2bb20f80310280400b3426598b4eca)
- - - - -
930eb181 by Matthew Craven at 2024-10-03T11:30:15-04:00
testsuite: Give the pre_cmd for mhu-perf more time
(cherry picked from commit dba03aababff057c03e2d92677de02d8375cd23a)
- - - - -
0c24f3e2 by Cheng Shao at 2024-10-03T11:30:15-04:00
testsuite: give pre_cmd for mhu-perf 5x time
(cherry picked from commit 0820750140af2972ca254a42c0fdc537f3b7c447)
- - - - -
6bd62051 by Ben Gamari at 2024-10-03T18:16:53-04:00
Accept performance shifts
MultiLayerModulesTH_Make performance regresses considerably, but
bizarrely only on Darwin.
Metric Increase:
MultiLayerModulesTH_Make
- - - - -
30 changed files:
- .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py
- compiler/GHC/CmmToAsm/AArch64.hs
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/BlockLayout.hs
- compiler/GHC/CmmToAsm/Instr.hs
- compiler/GHC/CmmToAsm/Monad.hs
- compiler/GHC/CmmToAsm/PPC.hs
- compiler/GHC/CmmToAsm/PPC/Instr.hs
- compiler/GHC/CmmToAsm/Reg/Linear/AArch64.hs
- compiler/GHC/CmmToAsm/Reg/Liveness.hs
- compiler/GHC/CmmToAsm/X86.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/CmmToAsm/X86/Instr.hs
- compiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Core/Rules.hs
- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/Data/Maybe.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Iface/Tidy.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Runtime/Utils.hs
- compiler/GHC/Stg/Subst.hs
- compiler/GHC/StgToCmm/Ticky.hs
- compiler/GHC/StgToJS/Apply.hs
- compiler/GHC/StgToJS/Expr.hs
- compiler/GHC/Tc/Deriv/Generate.hs
- compiler/GHC/Tc/Deriv/Utils.hs
- compiler/GHC/Tc/Gen/HsType.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e34ba65f6b3c0b58dcf28c1d17efe5211871e5a3...6bd62051db8abee470e4b5481a6a110c319d21cc
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e34ba65f6b3c0b58dcf28c1d17efe5211871e5a3...6bd62051db8abee470e4b5481a6a110c319d21cc
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/20241004/b8c9b7e4/attachment-0001.html>
More information about the ghc-commits
mailing list