| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This fixes the initialisation functions when using -prof or
-finfo-table-map.
Fixes #21370
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The former behaviour of adding cost centres after optimization but
before unfoldings are created is not available via the flag
`prof-late-inline` instead.
I also reduced the overhead of -fprof-late* by pushing the cost centres
into lambdas. This means the cost centres will only account for
execution of functions and not their partial application.
Further I made LATE_CC cost centres it's own CC flavour so they now
won't clash with user defined ones if a user uses the same string for
a custom scc.
LateCC: Don't put cost centres inside constructor workers.
With -fprof-late they are rarely useful as the worker is usually
inlined. Even if the worker is not inlined or we use -fprof-late-linline
they are generally not helpful but bloat compile and run time
significantly. So we just don't add sccs inside constructor workers.
-------------------------
Metric Decrease:
T13701
-------------------------
|
|
|
|
|
|
|
|
|
|
|
| |
When profiling is enabled we must enter functions that might represent
thunks in order for their sccs to show up in the profile.
We might allocate even if the function is already evaluated in this
case. So we can't consider any potential function thunk to be a simple
scrut when profiling.
Not doing so caused profiled binaries to segfault.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This adds supports for various :set commands apart from `:set <FLAG>` in
multi repl, this includes `:set prompt` and so-on.
Fixes #21796
(cherry picked from commit 620ee7edc931dc5273dd04880059cc9ec8d41528)
|
|
|
|
| |
(cherry picked from commit 41eb749ada594961fc3276df6bb7319a396a167d)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
generating docs
The motiviation for this flag is to be able to produce documentation
which is suitable for uploading for hackage, ie, the cross-package links
work correctly.
There are basically three values you want to set this to:
* off - default, base_url = ../%pkg% which works for local browsing
* on - no argument , base_url = https:://hackage.haskell.org/package/%pkg%/docs - for hackage docs upload
* on - argument, for example, base_url = http://localhost:8080/package/%pkg%/docs for testing the documentation.
The `%pkg%` string is a template variable which is replaced with the
package identifier for the relevant package.
This is one step towards fixing #21749
(cherry picked from commit d002c6e04f0c0f26c3ee24661eb4cf5620f994ab)
|
|
|
|
| |
(cherry picked from commit ed793d7a5725689bf1f3c81ce3d7958ccaf60e7e)
|
|
|
|
| |
(cherry picked from commit 418afaf11b76339deb29b1717790e3749be89afc)
|
|
|
|
| |
(cherry picked from commit 74f3867dbc77cad216444ed1e12d095feb1ced92)
|
|
|
|
|
|
| |
Evidently fields may not come after sections in a cabal file.
(cherry picked from commit 16b9100c9ef6b34b88a52b3b9e663dd40abd028f)
|
|
|
|
|
|
|
|
|
|
|
| |
Since 6be2c5a7e9187fc14d51e1ec32ca235143bb0d8b we would probe for LD
rather early in `configure`. However, it turns out that this breaks
`configure`'s `ld`-override logic, which assumes that `LD` was set by
the user and aborts.
Fixes #21778.
(cherry picked from commit 995ea44d929d6141bb1a83912f45e9802faffb33)
|
|
|
|
| |
(cherry picked from commit c006ac0d1454119f0b456a00ff2416831c955e99)
|
|
|
|
|
|
|
|
|
|
| |
The AArch64/Darwin ABI requires that function arguments narrower
than 32-bits must be sign-extended by the caller. We neglected to
do this, resulting in #20735.
Fixes #20735.
(cherry picked from commit 696d64c347364ce75e23d37884ec0bd2543b0a6a)
|
|
|
|
|
|
| |
Previously there were very long, hard to parse lines. Fix this.
(cherry picked from commit 70f0c1f84213f7a09bc31e0eeefb5b089708f04b)
|
|
|
|
|
|
|
|
|
|
| |
Previously -ddump-llvm would change the backend used, which contrasts
with all other dump flags. This is quite surprising and cost me quite
a bit of time. Dump flags should not change compiler behavior.
Fixes #21776.
(cherry picked from commit df762ae9e2d5263fb71f6df38323ac3ca400cc47)
|
|
|
|
|
|
|
|
|
| |
Apple's AArch64 ABI requires that the caller sign-extend small integer
arguments. Set platformCConvNeedsExtension to reflect this fact.
Fixes #21773.
(cherry picked from commit 57a5f88cf70ec6dd65ff4a2df0c11805ec1db018)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were not updating the [copied,any_work,scav_find_work, max_n_todo_overflow]
counters during sequential collections. As well, we were double counting for
parallel collections.
To fix this we add an `else` clause to the `if (is_par_gc())`.
The par_* counters do not need to be updated in the sequential case
because they must be 0.
(cherry picked from commit eb0431489144effd6931c248801af3fe65227368)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was some confusion about whether FUN/TYPE/One/Many should be
BuiltInSyntax or UserSyntax. The answer is certainly UserSyntax as
BuiltInSyntax is for things which are directly constructed by the parser
rather than going through normal renaming channels.
I fixed all the obviously wrong places I could find and added a test for
the original bug which was caused by this (#21752)
Fixes #21752 #20695 #18302
(cherry picked from commit 251471e7706ea3029b4a0c086035c16e7b67a081)
|
|
|
|
| |
(cherry picked from commit 4c9dfd69621c85abad70764359af2fd87138b335)
|
|
|
|
| |
(cherry picked from commit 19606c4208db191165285b79ebc1efe7fb7f4ae4)
|
|
|
|
|
|
|
| |
Downstream bug for reference: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261798
Relevant upstream issue: #15718
(cherry picked from commit c7f9f6b547f502a20602ea33fdef893367efe476)
|
|
|
|
| |
(cherry picked from commit 31c214cc9d3873b7d1bf4751700cc6c7da09e11d)
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we could construct a `Box` of a NULL pointer from the `link`
field of `StgWeak`. Now we take care to avoid ever introducing such
pointers in `collect_pointers` and ensure that the `link` field is
represented as a `Maybe` in the `Closure` type.
Fixes #21622
(cherry picked from commit cadd775397a88889bb6be6aca34469eea8ba17ec)
|
|
|
|
| |
(cherry picked from commit 229d741f9907f0a07c475291fe3b1dbfcfea7aab)
|
|
|
|
| |
(cherry picked from commit 159b76282e50a138250557baa6aa4ed7cf031070)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We used to put OtherCon unfoldings on lambda binders of workers
and sometimes also join points/specializations with with the
assumption that since the wrapper would force these arguments
once we execute the RHS they would indeed be in WHNF.
This was wrong for reasons detailed in #21472. So now we purge
evaluated unfoldings from *all* lambda binders.
This fixes #21472, but at the cost of sometimes not using as efficient a
calling convention. It can also change inlining behaviour as some
occurances will no longer look like value arguments when they did
before.
As consequence we also change how we compute CBV information for
arguments slightly. We now *always* determine the CBV convention
for arguments during tidy. Earlier in the pipeline we merely mark
functions as candidates for having their arguments treated as CBV.
As before the process is described in the relevant notes:
Note [CBV Function Ids]
Note [Attaching CBV Marks to ids]
Note [Never put `OtherCon` unfoldigns on lambda binders]
(cherry picked from commit ac7a7fc88b51f9fb4e84499397e12eb0081ba79e)
-------------------------
Metric Decrease:
T12425
T13035
T18223
T18223
T18923
MultiLayerModulesTH_OneShot
Metric Increase:
T18223
WWRec
-------------------------
|
|
|
|
|
|
|
| |
We use compatibleRep to compare reps, and avoid checking functions with
levity polymorphic types because of #21399.
(cherry-picked from commit 636f7c62b1c30d130d88d6ad0763d894a8513e8a)
|
|
|
|
| |
Fixes #21233
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When combining the ArityType of two case branches we need to make the
conservative decision to
Before this patch `\1. T` when combined with `T` would result in `\1.
T`, the result being that we would then eta-expand the branch of type
`T` (even though we concluded it wasn't necessarily safe to do so).
In particular, this goes wrong when the branch contains a call to a join point, if
we decide to eta-expand it anyway then the join-point gets oversatured.
This is a bit of latent bug which was only triggered quite indirectly by
inserting cost-centres but seems like it could have happened in other
scenarios.
Therefore the correct result of combining `\1. T` and `T` is the
conservative `T`. This patch corrects the logic in `andArityType` to
produce that result.
Fixes #21694
-------------------------
Metric Increase:
ManyAlternatives
ManyConstructors
MultiComponentModules
MultiComponentModulesRecomp
MultiLayerModules
MultiLayerModulesRecomp
T10421
T12425
T12707
T13035
T13379
T13701
T14683
T15703
T16875
T1969
T3064
T3294
T4801
T5321FD
T5321Fun
T5631
T783
T9020
T9198
T9233
T9961
-------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #21742.
-------------------------
Metric Decrease:
T15164
T5631
Metric Increase:
MultiComponentModulesRecomp
T12425
T13056
T16875
-------------------------
|
|
|
|
| |
This reverts commit 4512ad2d6a8e65ea43c86c816411cb13b822f674.
|
|
|
|
|
|
|
|
|
|
| |
Previously we would flag the symbol as weak but failed
to set its address, which must be computed from an "auxiliary"
symbol entry the follows the weak symbol.
Fixes #21556.
(cherry picked from commit 53b3fa1c782b251076707a024f55276d4ccb0a6c)
|
|
|
|
|
|
| |
This makes it easier to see how resolution failures nest.
(cherry picked from commit 30b8b7f182972ea5abb3be862302d3127a36a259)
|
| |
|
|
|
|
|
|
| |
We were attempting to boot a src-tarball which doesn't work as ./boot is
not included in the source tarball. This slipped through as the job is
only run on nightly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Despite this code having been present in the core-to-bytecode
implementation, I have observed it in the wild starting with 9.2,
causing enormous slowdown in certain situations.
My test case produces the following profiles:
Before:
```
total time = 559.77 secs (559766 ticks @ 1000 us, 1 processor)
total alloc = 513,985,665,640 bytes (excludes profiling overheads)
COST CENTRE MODULE SRC %time %alloc ticks bytes
elem_by Data.OldList libraries/base/Data/OldList.hs:429:1-7 67.6 92.9 378282 477447404296
eqInt GHC.Classes libraries/ghc-prim/GHC/Classes.hs:275:8-14 12.4 0.0 69333 32
$c>>= GHC.Data.IOEnv <no location info> 6.9 0.6 38475 3020371232
```
After:
```
total time = 89.83 secs (89833 ticks @ 1000 us, 1 processor)
total alloc = 39,365,306,360 bytes (excludes profiling overheads)
COST CENTRE MODULE SRC %time %alloc ticks bytes
$c>>= GHC.Data.IOEnv <no location info> 43.6 7.7 39156 3020403424
doCase GHC.StgToByteCode compiler/GHC/StgToByteCode.hs:(805,1)-(1054,53) 2.5 7.4 2246 2920777088
```
(cherry picked from commit 25b510c3ffdb6f43695c31c0740a5cbe1b7f3898)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The install_includes for the RTS package used to be put in the top-level
./include folder but this would lead to confusing things happening if
you installed multiple GHC versions side-by-side.
We don't need this folder anymore because install-includes
is honoured properly by cabal and the relevant header files already
copied in by the cabal installation process.
If you want to depend on the header files for the RTS in a Haskell
project then you just have to depend on the `rts` package and the
correct include directories will be provided for you.
If you want to depend on the header files in a standard C project then
you should query ghc-pkg to get the right paths.
```
ghc-pkg field rts include-dirs --simple-output
```
Fixes #21609
(cherry picked from commit aa7e1f209ddf3dba66b3b212bf2089986c10023e)
|
|
|
|
|
|
|
|
|
| |
Test that we can successfully link against C++ code both in GHCi and
batch compilation.
See #20010
(cherry picked from commit 03efe28317c5e037eab4d47790a6a1fb74d38c3d)
|
|
|
|
|
|
|
|
|
|
| |
Here we introduce a new "virtual" package into the initial package
database, `system-cxx-std-lib`. This gives users a convenient, platform
agnostic way to link against C++ libraries, addressing #20010.
Fixes #20010.
(cherry picked from commit 0ef249aa26f653677c5368bb51af34f7577ba5b9)
|
|
|
|
| |
(cherry picked from commit 43628ed44b063e25e6d1394314ed89f07f026503)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Here we introduce proper support for compilation of C++ objects. This
includes:
* logic in `configure` to detect the C++ toolchain and propagating this
information into the `settings` file
* logic in the driver to use the C++ toolchain when compiling C++
sources
(cherry picked from commit fb579e15c56994bc6c4cc266535024f20a81f830)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Configure's --enable-ld-override functionality is intended to ensure
that we don't rely on ld.bfd, which tends to be slow and buggy, on
Linux and Windows. However, on Darwin the lack of sensible package
management makes it extremely easy for users to have awkward mixtures of
toolchain components from, e.g., XCode, the Apple Command-Line Tools
package, and homebrew. This leads to extremely confusing problems
like #21712.
Here we avoid this by simply giving up on linker selection on Darwin
altogether. This isn't so bad since the Apple ld64 linker has decent
performance and AFAICT fairly reliable.
Closes #21712.
(cherry picked from commit bde65ea90ed61696eefc93c83efddf7af68d413e)
|
|
|
|
|
|
| |
Fixes #21506.
(cherry picked from commit aa9d9381e5c5d7b96966d817372085897585ecdd)
|
|
|
|
|
|
|
|
| |
Previously the check_for_gold_t22266 configure check could result in
spurious warnings coming from the linker being blurted to stderr.
Suppress these by piping stderr to /dev/null.
(cherry picked from commit cdc75a1fedfa3c0f6b3fb365247e7fbc53b9147b)
|
| |
|
|
|
|
|
|
| |
Fixes #21682
(cherry picked from commit 1fbba97b17d7bbfada0d9620d126f84b8d57be2d)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We used to process the rhs of non-recursive bindings and their body
using the same env. If we had something like
let x = ... x ...
this caused trouble because the two xs refer to different binders
but we would substitute both for a new binder x2 causing out of scope
errors.
We now simply use two different envs for the rhs and body in cse_bind.
It's all explained in the Note [Separate envs for let rhs and body]
Fixes #21685
(cherry picked from commit 56ebf9a5bfc8791c1fa609b960f3c161882540e3)
|