[Git][ghc/ghc][wip/spj-unf-size] 103 commits: Fix restarts in .ghcid
Simon Peyton Jones (@simonpj)
gitlab at gitlab.haskell.org
Fri Nov 10 10:05:25 UTC 2023
Simon Peyton Jones pushed to branch wip/spj-unf-size at Glasgow Haskell Compiler / GHC
Commits:
a0ac8785 by Sebastian Graf at 2023-10-14T19:17:12-04:00
Fix restarts in .ghcid
Using the whole of `hadrian/` restarted in a loop for me.
- - - - -
fea9ecdb by Sebastian Graf at 2023-10-14T19:17:12-04:00
CorePrep: Refactor FloatingBind (#23442)
A drastically improved architecture for local floating in CorePrep
that decouples the decision of whether a float is going to be let- or case-bound
from how far it can float (out of strict contexts, out of lazy contexts, to
top-level).
There are a couple of new Notes describing the effort:
* `Note [Floating in CorePrep]` for the overview
* `Note [BindInfo and FloatInfo]` for the new classification of floats
* `Note [Floats and FloatDecision]` for how FloatInfo is used to inform
floating decisions
This is necessary ground work for proper treatment of Strict fields and
unlifted values at top-level.
Fixes #23442.
NoFib results (omitted = 0.0%):
```
--------------------------------------------------------------------------------
Program Allocs Instrs
--------------------------------------------------------------------------------
pretty 0.0% -1.6%
scc 0.0% -1.7%
--------------------------------------------------------------------------------
Min 0.0% -1.7%
Max 0.0% -0.0%
Geometric Mean -0.0% -0.0%
```
- - - - -
32523713 by Matthew Pickering at 2023-10-14T19:17:49-04:00
hadrian: Move ghcBinDeps into ghcLibDeps
This completes a5227080b57cb51ac34d4c9de1accdf6360b818b, the
`ghc-usage.txt` and `ghci-usage.txt` file are also used by the `ghc`
library so need to make sure they are present in the libdir even if we
are not going to build `ghc-bin`.
This also fixes things for cross compilers because the stage2
cross-compiler requires the ghc-usage.txt file, but we are using
the stage2 lib folder but not building stage3:exe:ghc-bin so
ghc-usage.txt was not being generated.
- - - - -
ec3c4488 by sheaf at 2023-10-14T19:18:29-04:00
Combine GREs when combining in mkImportOccEnv
In `GHC.Rename.Names.mkImportOccEnv`, we sometimes discard one import
item in favour of another, as explained in Note [Dealing with imports]
in `GHC.Rename.Names`. However, this can cause us to lose track of
important parent information.
Consider for example #24084:
module M1 where { class C a where { type T a } }
module M2 ( module M1 ) where { import M1 }
module M3 where { import M2 ( C, T ); instance C () where T () = () }
When processing the import list of `M3`, we start off (for reasons that
are not relevant right now) with two `Avail`s attached to `T`, namely
`C(C, T)` and `T(T)`. We combine them in the `combine` function of
`mkImportOccEnv`; as described in Note [Dealing with imports] we discard
`C(C, T)` in favour of `T(T)`. However, in doing so, we **must not**
discard the information want that `C` is the parent of `T`. Indeed,
losing track of this information can cause errors when importing,
as we could get an error of the form
‘T’ is not a (visible) associated type of class ‘C’
We fix this by combining the two GREs for `T` using `plusGRE`.
Fixes #24084
- - - - -
257c2807 by Ilias Tsitsimpis at 2023-10-14T19:19:07-04:00
hadrian: Pass -DNOSMP to C compiler when needed
Hadrian passes the -DNOSMP flag to GHC when the target doesn't support
SMP, but doesn't pass it to CC as well, leading to the following
compilation error on mips64el:
| Run Cc (FindCDependencies CDep) Stage1: rts/sm/NonMovingScav.c => _build/stage1/rts/build/c/sm/NonMovingScav.o.d
Command line: /usr/bin/mips64el-linux-gnuabi64-gcc -E -MM -MG -MF _build/stage1/rts/build/c/hooks/FlagDefaults.thr_debug_p_o.d -MT _build/stage1/rts/build/c/hooks/FlagDefaults.o -Irts/include -I_build/stage1/rts/build -I_build/stage1/rts/build/include -Irts/include -x c rts/hooks/FlagDefaults.c -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Winline -Wpointer-arith -Wmissing-noreturn -Wnested-externs -Wredundant-decls -Wundef -fno-strict-aliasing -DTHREADED_RTS -DDEBUG -fomit-frame-pointer -O2 -g -Irts -I_build/stage1/rts/build -DDEBUG -fno-omit-frame-pointer -g3 -O0
===> Command failed with error code: 1
In file included from rts/include/Stg.h:348,
from rts/include/Rts.h:38,
from rts/hooks/FlagDefaults.c:8:
rts/include/stg/SMP.h:416:2: error: #error memory barriers unimplemented on this architecture
416 | #error memory barriers unimplemented on this architecture
| ^~~~~
rts/include/stg/SMP.h:440:2: error: #error memory barriers unimplemented on this architecture
440 | #error memory barriers unimplemented on this architecture
| ^~~~~
rts/include/stg/SMP.h:464:2: error: #error memory barriers unimplemented on this architecture
464 | #error memory barriers unimplemented on this architecture
| ^~~~~
The old make system correctly passed this flag to both GHC and CC [1].
Fix this error by passing -DNOSMP to CC as well.
[1] https://gitlab.haskell.org/ghc/ghc/-/blob/00920f176b0235d5bb52a8e054d89a664f8938fe/rts/ghc.mk#L407
Closes #24082
- - - - -
13d3c613 by John Ericson at 2023-10-14T19:19:42-04:00
Users Guide: Drop dead code for Haddock refs to `parallel`
I noticed while working on !11451 that `@LIBRARY_parallel_UNIT_ID@` was
not substituted. It is dead code -- there is no `parallel-ref` usages
and it doesn't look like there ever was (going back to
3e5d0f188d6c8633e55e9ba6c8941c07e459fa4b), so let's delete it.
- - - - -
fe067577 by Sylvain Henry at 2023-10-18T19:40:25-04:00
Avoid out-of-bound array access in bigNatIsPowerOf2 (fix #24066)
bigNatIndex# in the `where` clause wasn't guarded by "bigNatIsZero a".
- - - - -
cc1625b1 by Sylvain Henry at 2023-10-18T19:40:25-04:00
Bignum: fix right shift of negative BigNat with native backend
- - - - -
cbe4400d by Sylvain Henry at 2023-10-18T19:40:25-04:00
Rts: expose rtsOutOfBoundsAccess symbol
- - - - -
72c7380c by Sylvain Henry at 2023-10-18T19:40:25-04:00
Hadrian: enable `-fcheck-prim-bounds` in validate flavour
This allows T24066 to fail when the bug is present.
Otherwise the out-of-bound access isn't detected as it happens in
ghc-bignum which wasn't compiled with the bounds check.
- - - - -
f9436990 by John Ericson at 2023-10-18T19:41:01-04:00
Make Hadrian solely responsible for substituting `docs/users_guide/ghc_config.py.in`
Fixes #24091
Progress on #23966
Issue #24091 reports that `@ProjectVersion@` is no longer being
substituted in the GHC user's guide. I assume this is a recent issue,
but I am not sure how it's worked since
c1a3ecde720b3bddc2c8616daaa06ee324e602ab; it looks like both Hadrian and
configure are trying to substitute the same `.in` file!
Now only Hadrian does. That is better anyways; already something that
issue #23966 requested.
It seems like we were missing some dependencies in Hadrian. (I really,
really hate that this is possible!) Hopefully it is fixed now.
- - - - -
b12df0bb by John Ericson at 2023-10-18T19:41:37-04:00
`ghcversion.h`: No need to cope with undefined `ProjectPatchLevel*`
Since 4e6c80197f1cc46dfdef0300de46847c7cfbdcb0, these are guaranteed to
be defined. (Guaranteed including a test in the testsuite.)
- - - - -
0295375a by John Ericson at 2023-10-18T19:41:37-04:00
Generate `ghcversion.h` from a `.in` file
Now that there are no conditional sections (see the previous commit), we
can just a do simple substitution rather than pasting it together line
by line.
Progress on #23966
- - - - -
740a1b85 by Krzysztof Gogolewski at 2023-10-19T11:37:20-04:00
Add a regression test for #24064
- - - - -
921fbf2f by Hécate Moonlight at 2023-10-19T11:37:59-04:00
CLC Proposal #182: Export List from Data.List
Proposal link: https://github.com/haskell/core-libraries-committee/issues/182
- - - - -
4f02d3c1 by Sylvain Henry at 2023-10-20T04:01:32-04:00
rts: fix small argument passing on big-endian arch (fix #23387)
- - - - -
b86243b4 by Sylvain Henry at 2023-10-20T04:02:13-04:00
Interpreter: fix literal alignment on big-endian architectures (fix #19261)
Literals weren't correctly aligned on big-endian, despite what the
comment said.
- - - - -
a4b2ec47 by Sylvain Henry at 2023-10-20T04:02:54-04:00
Testsuite: recomp011 and recomp015 are fixed on powerpc
These tests have been fixed but not tested and re-enabled on big-endian
powerpc (see comments in #11260 and #11323)
- - - - -
fded7dd4 by Sebastian Graf at 2023-10-20T04:03:30-04:00
CorePrep: Allow floating dictionary applications in -O0 into a Rec (#24102)
- - - - -
02efc181 by John Ericson at 2023-10-22T02:48:55-04:00
Move function checks to RTS configure
Some of these functions are used in `base` too, but we can copy the
checks over to its configure if that's an issue.
- - - - -
5f4bccab by John Ericson at 2023-10-22T02:48:55-04:00
Move over a number of C-style checks to RTS configure
- - - - -
5cf04f58 by John Ericson at 2023-10-22T02:48:55-04:00
Move/Copy more `AC_DEFINE` to RTS config
Only exception is the LLVM version macros, which are used for GHC
itself.
- - - - -
b8ce5dfe by John Ericson at 2023-10-22T02:48:55-04:00
Define `TABLES_NEXT_TO_CODE` in the RTS configure
We create a new cabal flag to facilitate this.
- - - - -
4a40271e by John Ericson at 2023-10-22T02:48:55-04:00
Configure scripts: `checkOS`: Make a bit more robust
`mingw64` and `mingw32` are now both accepted for `OSMinGW32`. This
allows us to cope with configs/triples that we haven't normalized extra
being what GNU `config.sub` does.
- - - - -
16bec0a0 by John Ericson at 2023-10-22T02:48:55-04:00
Generate `ghcplatform.h` from RTS configure
We create a new cabal flag to facilitate this.
- - - - -
7dfcab2f by John Ericson at 2023-10-22T02:48:55-04:00
Get rid of all mention of `mk/config.h`
The RTS configure script is now solely responsible for managing its
headers; the top level configure script does not help.
- - - - -
c1e3719c by Cheng Shao at 2023-10-22T02:49:33-04:00
rts: drop stale mentions of MIN_UPD_SIZE
We used to have MIN_UPD_SIZE macro that describes the minimum reserved
size for thunks, so that the thunk can be overwritten in place as
indirections or blackholes. However, this macro has not been actually
defined or used anywhere since a long time ago; StgThunkHeader already
reserves a padding word for this purpose. Hence this patch which drops
stale mentions of MIN_UPD_SIZE.
- - - - -
d24b0d85 by Andrew Lelechenko at 2023-10-22T02:50:11-04:00
base changelog: move non-backported entries from 4.19 section to 4.20
Neither !10933 (check https://hackage.haskell.org/package/base-4.19.0.0/docs/src/Text.Read.Lex.html#numberToRangedRational)
nor !10189 (check https://hackage.haskell.org/package/base-4.19.0.0/docs/src/Data.List.NonEmpty.html#unzip)
were backported to `base-4.19.0.0`. Moving them to `base-4.20.0.0` section.
Also minor stylistic changes to other entries, bringing them to a uniform form.
- - - - -
de78b32a by Alan Zimmerman at 2023-10-23T09:09:41-04:00
EPA Some tweaks to annotations
- Fix span for GRHS
- Move TrailingAnns from last match to FunBind
- Fix GADT 'where' clause span
- Capture full range for a CaseAlt Match
- - - - -
d5a8780d by Simon Hengel at 2023-10-23T09:10:23-04:00
Update primitives.rst
- - - - -
4d075924 by Josh Meredith at 2023-10-24T23:04:12+11:00
JS/userguide: add explanation of writing jsbits
- - - - -
07ab5cc1 by Cheng Shao at 2023-10-24T15:40:32-04:00
testsuite: increase timeout of ghc-api tests for wasm32
ghc-api tests for wasm32 are more likely to timeout due to the large
wasm module sizes, especially when testing with wasm native tail
calls, given wasmtime's handling of tail call opcodes are suboptimal
at the moment. It makes sense to increase timeout specifically for
these tests on wasm32. This doesn't affect other targets, and for
wasm32 we don't increase timeout for all tests, so not to risk letting
major performance regressions slip through the testsuite.
- - - - -
0d6acca5 by Greg Steuck at 2023-10-26T08:44:23-04:00
Explicitly require RLIMIT_AS before use in OSMem.c
This is done elsewhere in the source tree. It also suddenly is
required on OpenBSD.
- - - - -
9408b086 by Sylvain Henry at 2023-10-26T08:45:03-04:00
Modularity: modularize external linker
Decouple runLink from DynFlags to allow calling runLink more easily.
This is preliminary work for calling Emscripten's linker (emcc) from
our JavaScript linker.
- - - - -
e0f35030 by doyougnu at 2023-10-27T08:41:12-04:00
js: add JStg IR, remove unsaturated constructor
- Major step towards #22736 and adding the optimizer in #22261
- - - - -
35587eba by Simon Peyton Jones at 2023-10-27T08:41:48-04:00
Fix a bug in tail calls with ticks
See #24078 for the diagnosis. The change affects only
the Tick case of occurrence analysis.
It's a bit hard to test, so no regression test (yet anyway).
- - - - -
9bc5cb92 by Matthew Craven at 2023-10-28T07:06:17-04:00
Teach tag-inference about SeqOp/seq#
Fixes the STG/tag-inference analogue of #15226.
Co-Authored-By: Simon Peyton Jones <simon.peytonjones at gmail.com>
- - - - -
34f06334 by Moritz Angermann at 2023-10-28T07:06:53-04:00
[PEi386] Mask SYM_TYPE_DUP_DISCARD in makeSymbolExtra
48e391952c17ff7eab10b0b1456e3f2a2af28a9b
introduced `SYM_TYPE_DUP_DISCARD` to the bitfield.
The linker however, failed to mask the `SYM_TYPE_DUP_DISCARD` value.
Thus `== SYM_TYPE_CODE` comparisons easily failed. This lead to us
relocating DATA lookups (GOT) into E8 (call) and E9 (jump) instructions.
- - - - -
5b51b2a2 by Mario Blažević at 2023-10-28T07:07:33-04:00
Fix and test for issue #24111, TH.Ppr output of pattern synonyms
- - - - -
723bc352 by Alan Zimmerman at 2023-10-30T20:36:41-04:00
EPA: print doc comments as normal comments
And ignore the ones allocated in haddock processing.
It does not guarantee that every original haddock-like comment appears
in the output, as it discards ones that have no legal attachment point.
closes #23459
- - - - -
21b76843 by Simon Peyton Jones at 2023-10-30T20:37:17-04:00
Fix non-termination bug in equality solver
constraint left-to-right then right to left, forever.
Easily fixed.
- - - - -
270867ac by Sebastian Graf at 2023-10-30T20:37:52-04:00
ghc-toolchain: build with `-package-env=-` (#24131)
Otherwise globally installed libraries (via `cabal install --lib`)
break the build.
Fixes #24131.
- - - - -
7a90020f by Krzysztof Gogolewski at 2023-10-31T20:03:37-04:00
docs: fix ScopedTypeVariables example (#24101)
The previous example didn't compile.
Furthermore, it wasn't demonstrating the point properly.
I have changed it to an example which shows that 'a' in the signature
must be the same 'a' as in the instance head.
- - - - -
49f69f50 by Krzysztof Gogolewski at 2023-10-31T20:04:13-04:00
Fix pretty-printing of type family dependencies
"where" should be after the injectivity annotation.
- - - - -
73c191c0 by Ben Gamari at 2023-10-31T20:04:49-04:00
gitlab-ci: Bump LLVM bootstrap jobs to Debian 12
As the Debian 10 images have too old an LLVM.
Addresses #24056.
- - - - -
5b0392e0 by Matthew Pickering at 2023-10-31T20:04:49-04:00
ci: Run aarch64 llvm backend job with "LLVM backend" label
This brings it into line with the x86 LLVM backend job.
- - - - -
9f9c9227 by Ryan Scott at 2023-11-01T09:19:12-04:00
More robust checking for DataKinds
As observed in #22141, GHC was not doing its due diligence in catching code
that should require `DataKinds` in order to use. Most notably, it was allowing
the use of arbitrary data types in kind contexts without `DataKinds`, e.g.,
```hs
data Vector :: Nat -> Type -> Type where
```
This patch revamps how GHC tracks `DataKinds`. The full specification is
written out in the `DataKinds` section of the GHC User's Guide, and the
implementation thereof is described in `Note [Checking for DataKinds]` in
`GHC.Tc.Validity`. In brief:
* We catch _type_-level `DataKinds` violations in the renamer. See
`checkDataKinds` in `GHC.Rename.HsType` and `check_data_kinds` in
`GHC.Rename.Pat`.
* We catch _kind_-level `DataKinds` violations in the typechecker, as this
allows us to catch things that appear beneath type synonyms. (We do *not*
want to do this in type-level contexts, as it is perfectly fine for a type
synonym to mention something that requires DataKinds while still using the
type synonym in a module that doesn't enable DataKinds.) See `checkValidType`
in `GHC.Tc.Validity`.
* There is now a single `TcRnDataKindsError` that classifies all manner of
`DataKinds` violations, both in the renamer and the typechecker. The
`NoDataKindsDC` error has been removed, as it has been subsumed by
`TcRnDataKindsError`.
* I have added `CONSTRAINT` is `isKindTyCon`, which is what checks for illicit
uses of data types at the kind level without `DataKinds`. Previously,
`isKindTyCon` checked for `Constraint` but not `CONSTRAINT`. This is
inconsistent, given that both `Type` and `TYPE` were checked by `isKindTyCon`.
Moreover, it thwarted the implementation of the `DataKinds` check in
`checkValidType`, since we would expand `Constraint` (which was OK without
`DataKinds`) to `CONSTRAINT` (which was _not_ OK without `DataKinds`) and
reject it. Now both are allowed.
* I have added a flurry of additional test cases that test various corners of
`DataKinds` checking.
Fixes #22141.
- - - - -
575d7690 by Sylvain Henry at 2023-11-01T09:19:53-04:00
JS: fix FFI "wrapper" and "dynamic"
Fix codegen and helper functions for "wrapper" and "dynamic" foreign
imports.
Fix tests:
- ffi006
- ffi011
- T2469
- T4038
Related to #22363
- - - - -
81fb8885 by Alan Zimmerman at 2023-11-01T22:23:56-04:00
EPA: Use full range for Anchor
This change requires a series of related changes, which must all land
at the same time, otherwise all the EPA tests break.
* Use the current Anchor end as prior end
Use the original anchor location end as the source of truth for
calculating print deltas.
This allows original spacing to apply in most cases, only changed
AST items need initial delta positions.
* Add DArrow to TrailingAnn
* EPA Introduce HasTrailing in ExactPrint
Use [TrailingAnn] in enterAnn and remove it from
ExactPrint (LocatedN RdrName)
* In HsDo, put TrailingAnns at top of LastStmt
* EPA: do not convert comments to deltas when balancing.
* EPA: deal with fallout from getMonoBind
* EPA fix captureLineSpacing
* EPA print any comments in the span before exiting it
* EPA: Add comments to AnchorOperation
* EPA: remove AnnEofComment, it is no longer used
Updates Haddock submodule
- - - - -
03e82511 by Rodrigo Mesquita at 2023-11-01T22:24:32-04:00
Fix in docs regarding SSymbol, SNat, SChar (#24119)
- - - - -
362cc693 by Matthew Pickering at 2023-11-01T22:25:08-04:00
hadrian: Update bootstrap plans (9.4.6, 9.4.7, 9.6.2, 9.6.3, 9.8.1)
Updating the bootstrap plans with more recent GHC versions.
- - - - -
00b9b8d3 by Matthew Pickering at 2023-11-01T22:25:08-04:00
ci: Add 9.8.1 bootstrap testing job
- - - - -
ef3d20f8 by Matthew Pickering at 2023-11-01T22:25:08-04:00
Compatibility with 9.8.1 as boot compiler
This fixes several compatability issues when using 9.8.1 as the boot
compiler.
* An incorrect version guard on the stack decoding logic in ghc-heap
* Some ghc-prim bounds need relaxing
* ghc is no longer wired in, so we have to remove the -this-unit-id ghc
call.
Fixes #24077
- - - - -
6755d833 by Jaro Reinders at 2023-11-03T10:54:42+01:00
Add NCG support for common 64bit operations to the x86 backend.
These used to be implemented via C calls which was obviously quite bad
for performance for operations like simple addition.
Co-authored-by: Andreas Klebinger
- - - - -
0dfb1fa7 by Vladislav Zavialov at 2023-11-03T14:08:41-04:00
T2T in Expressions (#23738)
This patch implements the T2T (term-to-type) transformation in
expressions. Given a function with a required type argument
vfun :: forall a -> ...
the user can now call it as
vfun (Maybe Int)
instead of
vfun (type (Maybe Int))
The Maybe Int argument is parsed and renamed as a term (HsExpr), but then
undergoes a conversion to a type (HsType).
See the new function expr_to_type in compiler/GHC/Tc/Gen/App.hs
and Note [RequiredTypeArguments and the T2T mapping]
Left as future work: checking for puns.
- - - - -
cc1c7c54 by Duncan Coutts at 2023-11-05T00:23:44-04:00
Add a test for I/O managers
It tries to cover the cases of multiple threads waiting on the same
fd for reading and multiple threads waiting for writing, including
wait cancellation by async exceptions.
It should work for any I/O manager, in-RTS or in-Haskell.
Unfortunately it will not currently work for Windows because it relies
on anonymous unix sockets. It could in principle be ported to use
Windows named pipes.
- - - - -
2e448f98 by Cheng Shao at 2023-11-05T00:23:44-04:00
Skip the IOManager test on wasm32 arch.
The test relies on the sockets API which are not (yet) available.
- - - - -
fe50eb35 by Cheng Shao at 2023-11-05T00:24:20-04:00
compiler: fix eager blackhole symbol in wasm32 NCG
- - - - -
af771148 by Cheng Shao at 2023-11-05T00:24:20-04:00
testsuite: fix optasm tests for wasm32
- - - - -
1b90735c by Matthew Pickering at 2023-11-05T00:24:20-04:00
testsuite: Add wasm32 to testsuite arches with NCG
The compiler --info reports that wasm32 compilers have a NCG, so we
should agree with that here.
- - - - -
db9a6496 by Alan Zimmerman at 2023-11-05T00:24:55-04:00
EPA: make locA a function, not a field name
And use it to generalise reLoc
The following for the windows pipeline one. 5.5%
Metric Increase:
T5205
- - - - -
833e250c by Simon Peyton Jones at 2023-11-05T00:25:31-04:00
Update the unification count in wrapUnifierX
Omitting this caused type inference to fail in #24146.
This was an accidental omision in my refactoring of the
equality solver.
- - - - -
e451139f by Andreas Klebinger at 2023-11-05T00:26:07-04:00
Remove an accidental git conflict marker from a comment.
- - - - -
30baac7a by Tobias Haslop at 2023-11-06T10:50:32+00:00
Add laws relating between Foldable/Traversable with their Bi- superclasses
See https://github.com/haskell/core-libraries-committee/issues/205 for
discussion.
This commit also documents that the tuple instances only satisfy the
laws up to lazyness, similar to the documentation added in !9512.
- - - - -
df626f00 by Tobias Haslop at 2023-11-07T02:20:37-05:00
Elaborate on the quantified superclass of Bifunctor
This was requested in the comment
https://github.com/haskell/core-libraries-committee/issues/93#issuecomment-1597271700
for when Traversable becomes a superclass of Bitraversable, but similarly
applies to Functor/Bifunctor, which already are in a superclass relationship.
- - - - -
8217acb8 by Alan Zimmerman at 2023-11-07T02:21:12-05:00
EPA: get rid of l2l and friends
Replace them with
l2l to convert the location
la2la to convert a GenLocated thing
Updates haddock submodule
- - - - -
dd88a260 by Luite Stegeman at 2023-11-07T02:21:53-05:00
JS: remove broken newIdents from JStg Monad
GHC.JS.JStg.Monad.newIdents was broken, resulting in duplicate
identifiers being generated in h$c1, h$c2, ... .
This change removes the broken newIdents.
- - - - -
455524a2 by Matthew Craven at 2023-11-09T08:41:59-05:00
Create specially-solved DataToTag class
Closes #20532. This implements CLC proposal 104:
https://github.com/haskell/core-libraries-committee/issues/104
The design is explained in Note [DataToTag overview]
in GHC.Tc.Instance.Class. This replaces the existing
`dataToTag#` primop.
These metric changes are not "real"; they represent Unique-related
flukes triggering on a different set of jobs than they did previously.
See also #19414.
Metric Decrease:
T13386
T8095
Metric Increase:
T13386
T8095
Co-authored-by: Simon Peyton Jones <simon.peytonjones at gmail.com>
- - - - -
a05f4554 by Alan Zimmerman at 2023-11-09T08:42:35-05:00
EPA: get rid of glRR and friends in GHC/Parser.y
With the HasLoc and HasAnnotation classes, we can replace a
number of type-specific helper functions in the parser with
polymorphic ones instead
Metric Decrease:
MultiLayerModulesTH_Make
- - - - -
18498538 by Cheng Shao at 2023-11-09T16:58:12+00:00
ci: bump ci-images for wasi-sdk upgrade
- - - - -
52c0fc69 by PHO at 2023-11-09T19:16:22-05:00
Don't assume the current locale is *.UTF-8, set the encoding explicitly
primops.txt contains Unicode characters:
> LC_ALL=C ./genprimopcode --data-decl < ./primops.txt
> genprimopcode: <stdin>: hGetContents: invalid argument (cannot decode byte sequence starting from 226)
Hadrian must also avoid using readFile' to read primops.txt because it
tries to decode the file with a locale-specific encoding.
- - - - -
7233b3b1 by PHO at 2023-11-09T19:17:01-05:00
Use '[' instead of '[[' because the latter is a Bash-ism
It doesn't work on platforms where /bin/sh is something other than Bash.
- - - - -
6dbab180 by Simon Peyton Jones at 2023-11-09T19:17:36-05:00
Add an extra check in kcCheckDeclHeader_sig
Fix #24083 by checking for a implicitly-scoped type variable that is not
actually bound. See Note [Disconnected type variables] in GHC.Tc.Gen.HsType
For some reason, on aarch64-darwin we saw a 2.8% decrease in compiler
allocations for MultiLayerModulesTH_Make; but 0.0% on other architectures.
Metric Decrease:
MultiLayerModulesTH_Make
- - - - -
038726ca by Simon Peyton Jones at 2023-11-10T09:19:04+00:00
Work in progress on unfoldings re-engineering
- - - - -
73d2ca28 by Simon Peyton Jones at 2023-11-10T09:19:04+00:00
More
- - - - -
06b85333 by Simon Peyton Jones at 2023-11-10T09:19:04+00:00
More -- now it compiles
- - - - -
b4beee26 by Simon Peyton Jones at 2023-11-10T09:19:04+00:00
Wibbles
- - - - -
da9aa6a8 by Simon Peyton Jones at 2023-11-10T09:19:04+00:00
Wibbles
- - - - -
e4466ea0 by Simon Peyton Jones at 2023-11-10T09:19:04+00:00
Wibbles
- - - - -
bb4a130e by Simon Peyton Jones at 2023-11-10T09:19:04+00:00
More wibbles
In particular, respect OtherCon
- - - - -
ef697f96 by Simon Peyton Jones at 2023-11-10T09:19:04+00:00
oops remove spurious trace
- - - - -
bf71f51c by Simon Peyton Jones at 2023-11-10T09:19:04+00:00
Value args only in ExprTrees
- - - - -
44f10cb0 by Simon Peyton Jones at 2023-11-10T09:19:05+00:00
Another wibble
- - - - -
9ca38d83 by Simon Peyton Jones at 2023-11-10T09:19:05+00:00
Be a little bit more eager
- - - - -
b4ff08dd by Simon Peyton Jones at 2023-11-10T09:19:05+00:00
Comment out unused arg_is_free
- - - - -
8951fda7 by Simon Peyton Jones at 2023-11-10T09:19:05+00:00
Fix scoping bug
- - - - -
762f54f4 by Simon Peyton Jones at 2023-11-10T09:19:05+00:00
Take care with void args
- - - - -
e7142e1a by Simon Peyton Jones at 2023-11-10T09:19:05+00:00
Comments
- - - - -
d7df5287 by Simon Peyton Jones at 2023-11-10T09:19:05+00:00
Limit case width and depth
- - - - -
82731628 by Simon Peyton Jones at 2023-11-10T09:19:05+00:00
White space
- - - - -
4c7df811 by Simon Peyton Jones at 2023-11-10T09:19:05+00:00
Simplify size calculations
- - - - -
e9b2e751 by Simon Peyton Jones at 2023-11-10T09:19:05+00:00
Fix egregious error
- - - - -
c3893574 by Simon Peyton Jones at 2023-11-10T09:19:05+00:00
Further improvements
* Fix threshold in SpecConstr
* Need to recurse in keptCaseSize
- - - - -
7611d1a6 by Simon Peyton Jones at 2023-11-10T09:19:05+00:00
More care with discounts and sizes
- - - - -
8eb40184 by Simon Peyton Jones at 2023-11-10T09:19:05+00:00
More improvements
Rename et_tot to et_wc_tot (for "worst case")
Fix size bug in etCaseOf
- - - - -
25316031 by Simon Peyton Jones at 2023-11-10T09:19:05+00:00
Bale out altogether on very wide cases
- - - - -
cd534453 by Simon Peyton Jones at 2023-11-10T09:19:05+00:00
Stupid typo
- - - - -
6b6861ba by Simon Peyton Jones at 2023-11-10T09:19:05+00:00
Wibble
- - - - -
c301da74 by Simon Peyton Jones at 2023-11-10T09:19:05+00:00
More improvements
Mainly doing the result-discounts as before.
Some skirmishing about dealing with knownCon.. more to come
- - - - -
7c5e64d1 by Simon Peyton Jones at 2023-11-10T09:19:05+00:00
Fix a bad, subtle bug in exprIsConApp_maybe
In extend_in_scope We were simply overwriting useful bindings in the
in-scope set, notably ones that had unfoldings. That could lead to
repeated simplifier iterations.
- - - - -
15149cb1 by Simon Peyton Jones at 2023-11-10T09:19:05+00:00
Minor refactoring...
Plus: don't be so eager to inline when argument is a non-value,
but has some struture.
We want *some* incentive though.
- - - - -
b519fd3d by Simon Peyton Jones at 2023-11-10T09:19:05+00:00
Wibbles
The significant one is a discount for arguments that have structure
- - - - -
8475a27c by Simon Peyton Jones at 2023-11-10T10:04:39+00:00
More wibbles
- - - - -
30 changed files:
- .ghcid
- .gitignore
- .gitlab-ci.yml
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/PrimOps.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/CmmToAsm/Wasm/FromCmm.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/CmmToAsm/X86/Instr.hs
- compiler/GHC/CmmToAsm/X86/Ppr.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/FamInstEnv.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/ConstantFold.hs
- compiler/GHC/Core/Opt/LiberateCase.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/Pipeline.hs
- compiler/GHC/Core/Opt/Simplify/Env.hs
- compiler/GHC/Core/Opt/Simplify/Inline.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Ppr.hs
- compiler/GHC/Core/Seq.hs
- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/Subst.hs
- compiler/GHC/Core/TyCon.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/55dc1a5972a40610c416a428805b5294b3160f71...8475a27c3a675839b2e29c4fd604af42386196e4
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/55dc1a5972a40610c416a428805b5294b3160f71...8475a27c3a675839b2e29c4fd604af42386196e4
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/20231110/9dc3cc62/attachment-0001.html>
More information about the ghc-commits
mailing list