Commits on Source (44)
-
Currently, `integerDecodeDouble#` is known-key so that it can be recognised in constant folding. But that is very brittle and doesn't survive worker/wrapper, which we even do for `NOINLINE` things since #13143. Also it is a trade-off: The implementation of `integerDecodeDouble#` allocates an `Integer` box that never cancels aways if we don't inline it. Hence we recognise the `decodeDouble_Int64#` primop instead in constant folding, so that we can inline `integerDecodeDouble#`. As a result, `integerDecodeDouble#` no longer needs to be known-key. While doing so, I realised that we don't constant-fold `decodeFloat_Int#` either, so I also added a RULE for it. `integerDecodeDouble` is dead, so I deleted it. Part of #18092. This improves the 32-bit `realToFrac`/`toRational`: Metric Decrease: T10359
bc5de347 -
802b5e6f
-
Previously `TICK_BUMP_BY` was defined as ```c #define TICK_BUMP_BY(ctr,n) CLong[ctr] = CLong[ctr] + n ``` Yet the tickers themselves were defined as `StgInt`s. This happened to work out correctly on Linux, where `CLong` is 64-bits. However, it failed on Windows, where `CLong` is 32-bits, resulting in #18782. Fixes #18783.
18a3ddf7 -
5fc4243b
-
Move the atomix exchange over the Ptr type to an internal module. Fix a bug caused by us passing ptr-to-ptr instead of ptr to atomic exchange. Renamed interlockedExchange to exchangePtr. I've also added an cas primitive. It turned out we don't need it for WinIO but I'm leaving it in as it's useful for other things.
b41f7c38 -
948a14e1
-
Before this patch -flink-rts could link with GHC's rts instead of the selected one.
74d4017b -
0e8b923d
-
When linear types are disabled, HsUnrestrictedArrow is treated as HslinearArrow. Move this adjustment into the type checking phase, so that the parsed source accurately represents the source as parsed. Closes #18791
d6dff830 -
Several people have struggled with metric change annotations in their commit messages not being recognized due to the fact that GitLab's job log inserts a space at the beginning of each line. Teach the regular expression to accept this whitespace.
a94db588 -
* Include funTyCon in exposedPrimTyCons. Every single place using exposedPrimTyCons was adding funTyCon manually. * Remove unused synTyConResKind and ieLWrappedName * Add recordSelectorTyCon_maybe * In exprType, panic instead of giving a trace message and dummy output. This prevents #18767 reoccurring. * Fix compilation error in fragile concprog001 test (part of #18732)
e91ddddd -
In Cmm we can only have real units identified with an UnitId. Other units (on-the-fly instantiated units and holes) are only used in type-checking backpack sessions that don't produce Cmm.
386c2d7f -
Updates containers submodule.
a566c83d -
On windows the stack has to be allocated 4k at a time, otherwise we get a segfault. This is done by using a helper ___chkstk_ms that is provided by libgcc. The Haskell side already knows how to handle this but we need to do the same from STG. Previously we would drop the stack in StgRun but would only make it valid whenever the scheduler loop ran. This approach was fundamentally broken in that it falls apart when you take a signal from the OS. We see it less often because you initially get allocated a 1MB stack block which you have to blow past first. Concretely this means we must always keep the stack valid. Fixes #18601.
fd984d68 -
Some RTS ways are exposed via settings (ghcThreaded, ghcDebugged) but not all. It's simpler if the RTS exposes them all itself.
accdb24a -
Tracking: #18641
d360f343 -
Fixes #17919.
e48cab2a -
f7e2fff9
-
Replace options like collect_stats(['peak_megabytes_allocated'],4) with collect_runtime_residency(4) and so forth. Reason being that the later also supplies some default RTS arguments which make sure residency does not fluctuate too much. The new flags mean we get new (hopefully more accurate) baselines so accept the stat changes. ------------------------- Metric Decrease: T4029 T4334 T7850 Metric Increase: T13218 T7436 -------------------------
45a1d493 -
We now seem to use -Werror there. Which caused some long standing warnings to become errors. I applied changes to remove the warnings allowing the testsuite to run on windows as well.
ef65b154 -
e691a5a0
-
Previously we only matched on *variables* whose unfoldings were a ConApp of the form `IS lit#` or `NS lit##`. But we forgot to match on the ConApp directly... As a consequence, constant folding only worked after the FloatOut pass which creates bindings for most sub-expressions. With this patch, matching on bignums works even with -O0 (see bignumMatch test).
12191a99 -
A cleanup in 7f418acf accidentally discarded some parens in ConDeclGADT. Make sure these stay in the AST in a usable format. Also ensure the AnnLolly does not get lost in a GADT.
36787bba -
32dc7698
-
Previously the make build system's source distribution rules neglected to include Hadrian's sources. Fixes #18794.
9657f6f3 -
c832f7e2
-
6f0243ae
-
0fd3d360
-
dfaef1ca
-
This fixes a long-standing bug in the desugaring of record updates for data families, when the latter involves a GADT. It's all explained in Note [Update for GADTs] in GHC.HsToCore.Expr. Building the correct cast is surprisingly tricky, as that Note explains. Fixes #18809. The test case (in indexed-types/should_compile/T18809) contains several examples that exercise the dark corners.
bfdccac6 -
This should fix #18774.
e5c7c9c8 -
Firstly this improves code clarity. But it also has performance benefits as we no longer go through the name of the TyCon to get at it's unique. In order to make this work the recursion check for TyCon has been moved into it's own module in order to avoid import cycles.
ef950b19 -
!3798 added documentation and semantics for the flags, but not parsing.
fd302e93 -
db236ffc
-
Instead of recreating the HomeUnit from the DynFlags every time we need it, we store it in the HscEnv.
6a243e9d -
Hannes Siebenhandl authored5884fd32
-
ea59fd4d
-
22f218b7
-
74ee1237
-
Hécate Kleidukos authored274e21f0
-
Sebastian Graf authored
Arity analysis used to propagate optimistic arity types during fixed-point interation through the `ArityEnv`'s `ae_cheap_fun` field, which is like `GHC.Core.Utils.exprIsCheap`, but also considers the current iteration's optimistic arity, for the binder in question only. In #18793, we have seen that this is a problematic design, because it doesn't allow us to look through PAP bindings of that binder. Hence this patch refactors to a more traditional form with an explicit signature environment, in which we record the optimistic `ArityType` of the binder in question (and at the moment is the *only* binder that is recorded in the arity environment).
8d46816a -
Sebastian Graf authored
In #18793, we saw a compelling example which requires us to look at non-recursive let-bindings during arity analysis and unleash their arity types at use sites. After the refactoring in the previous patch, the needed change is quite simple and very local to `arityType`'s defn for non-recurisve `Let`. Apart from that, we had to get rid of the second item of `Note [Dealing with bottoms]`, which was entirely a safety measure and hindered optimistic fixed-point iteration. Fixes #18793. The following metric increases are all caused by this commit and a result of the fact that we just do more work now: Metric Increase: T3294 T12707
a9350186 -
Sebastian Graf authored
We didn't seem to test these old tests at all, judging from their expected output.
ef9dbc8f
Showing
- .gitlab-ci.yml 64 additions, 23 deletions.gitlab-ci.yml
- compiler/.hlint.yaml 7 additions, 0 deletionscompiler/.hlint.yaml
- compiler/GHC.hs 97 additions, 15 deletionscompiler/GHC.hs
- compiler/GHC/Builtin/Names.hs 0 additions, 6 deletionscompiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/Types/Prim.hs 1 addition, 0 deletionscompiler/GHC/Builtin/Types/Prim.hs
- compiler/GHC/Builtin/Utils.hs 3 additions, 4 deletionscompiler/GHC/Builtin/Utils.hs
- compiler/GHC/Builtin/primops.txt.pp 24 additions, 2 deletionscompiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/ByteCode/Asm.hs 3 additions, 1 deletioncompiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/InfoTable.hs 2 additions, 1 deletioncompiler/GHC/ByteCode/InfoTable.hs
- compiler/GHC/ByteCode/Instr.hs 1 addition, 1 deletioncompiler/GHC/ByteCode/Instr.hs
- compiler/GHC/ByteCode/Linker.hs 3 additions, 4 deletionscompiler/GHC/ByteCode/Linker.hs
- compiler/GHC/ByteCode/Types.hs 2 additions, 1 deletioncompiler/GHC/ByteCode/Types.hs
- compiler/GHC/Cmm/CLabel.hs 9 additions, 9 deletionscompiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Cmm/Dataflow/Collections.hs 1 addition, 3 deletionscompiler/GHC/Cmm/Dataflow/Collections.hs
- compiler/GHC/Cmm/Dataflow/Label.hs 2 additions, 5 deletionscompiler/GHC/Cmm/Dataflow/Label.hs
- compiler/GHC/Cmm/Node.hs 1 addition, 2 deletionscompiler/GHC/Cmm/Node.hs
- compiler/GHC/Cmm/Pipeline.hs 0 additions, 2 deletionscompiler/GHC/Cmm/Pipeline.hs
- compiler/GHC/CmmToAsm/BlockLayout.hs 6 additions, 7 deletionscompiler/GHC/CmmToAsm/BlockLayout.hs
- compiler/GHC/CmmToAsm/CFG.hs 6 additions, 8 deletionscompiler/GHC/CmmToAsm/CFG.hs
- compiler/GHC/CmmToAsm/Reg/Graph/SpillCost.hs 3 additions, 1 deletioncompiler/GHC/CmmToAsm/Reg/Graph/SpillCost.hs
compiler/.hlint.yaml
0 → 100644