| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
* moved deps related code into GHC.Unit.Module.Deps
* refactored Deps module to not export Dependencies constructor to help
maintaining invariants
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function was one of the main sources of allocation in a ticky
profile due to how it repeatedly deleted nodes from a large map.
Now firstly the cuts are normalised, so that chains of cuts are elimated
before any rewrites are applied. Then the CFG is traversed and
reconstructed once whilst applying the necessary rewrites to remove
shortcutted edges (based on the normalised cuts).
Ticket: #19471
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous algorithm scaled poorly when there was a large number of
blocks and edges.
The algorithm links together block chains which have edges between them
in the CFG. The new algorithm uses a union find data structure in order
to efficiently merge together blocks and calculate which block chain
each block id belonds to.
I copied the UnionFind data structure which already existed in Cabal
into the GHC library rathert than reimplement it myself.
This change results in a very significant reduction in allocations when
compiling the mmark package.
Ticket: #19471
|
|
|
|
|
|
|
|
|
|
| |
Before this change, the whole map would be traversed in order to delete
a node from the graph before calculating successors. This is quite
inefficient if the CFG is big, as was the case in the mmark package. A
more efficient alternative is to leave the CFG untouched and then just
delete the node once after the lookups have been performed.
Ticket: #19471
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We were ending up with a big 1GB thunk spike as the `fmap` operation did
not force the key values promptly.
This fixes the high maximum memory consumption when compiling the mmark
package. Compilation is still slow and allocates a lot more than
previous releases.
Related to #19471
|
| |
|
|
|
|
|
|
| |
The "ipe" transformer compilers everything in stage2 with
`-finfo-table-map` and `-fdistinct-constructor-tables` to produce a
compiler which is usable with `-hi` profiling and ghc-debug.
|
|
|
|
|
|
| |
In #20365 we noticed that a significant amount of time is spend in the
Core2Core cost-center, suggesting that some passes are likely missing
SCC pragmas. Try to fix this.
|
|
|
|
|
|
|
|
| |
Previously the implementation of writeFileAtomic (which was stolen from
Cabal) failed to preserve file mode, user and group, resulting
in #14017.
Fixes #14017.
|
| |
|
|
|
|
| |
Neither uses anything from Cabal, so the dependency can just be removed.
|
|
|
|
|
|
|
|
|
| |
The refactoring accidently removed these calls to eagerly remove
temporary files after a module has been compiled. This caused some
issues with tmpdirs getting filled up on my system when the project had
a large number of modules (for example, Agda)
Fixes #20293
|
|
|
|
|
|
|
|
|
|
| |
We needed to wait for the process to exit in the clean-up script as
otherwise the `llc` process will not be killed until compilation
finishes. This leads to running out of process spaces on some OSs.
Thanks to Edsko de Vries for suggesting this fix.
Fixes #20305
|
|
|
|
| |
Fix #17039
|
|
|
|
|
|
| |
This file configures clangd (C Language Server for IDEs) for the GHC
project.
Please note that this only works together with Haskell Language Server,
otherwise .hie-bios/stage0/lib does not exist.
|
|
|
|
|
|
|
|
| |
This commit fixes the following bug: when `outputHi` is set, and
both `.dyn_hi` and `.hi` are needed, both would be written to
`outputHi`, causing `.dyn_hi` to overwrite `.hi`. This causes
subsequent `readIface` to fail - "mismatched interface file profile
tag (wanted "", got "dyn")" - triggering unnecessary rebuild.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the following
foo = x
where -- do stuff
doStuff = do stuff
The "-- do stuff" comment is captured in the HsValBinds.
Closes #20297
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GHC will trigger a warning similar to the following when a strictness
flag is applied to an unlifted type (primitive or defined with the
Unlifted* extensions) in the definition of a data constructor.
Test.hs:7:13: warning: [-Wredundant-strictness-flags]
• Strictness flag has no effect on unlifted type ‘Int#’
• In the definition of data constructor ‘TestCon’
In the data type declaration for ‘Test’
|
7 | data Test = TestCon !Int#
| ^^^^^^^^^^^^^
Fixes #20187
|
|
|
|
|
|
| |
When determining whether to default a RuntimeRep or Multiplicity
variable, use isMetaTyVar to distinguish between metavariables
(which can be hidden) and skolems (which cannot).
|
|
|
|
| |
Fixes #20009
|
| |
|
|
|
|
| |
As noted in #20327, the previous guidance was out-of-date.
|
|
|
|
| |
As noted in #17568.
|
|
|
|
|
|
| |
Previously the Darwin installation logic would attempt to call xattr
unconditionally. This would break on older Darwin releases where this
utility did not exist.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch follows the rules specified in note [Constant folding through
nested expressions]. Modifications are summarized below.
- Added andFoldingRules, orFoldingRules to primOpRules under those
xxxxAndOp, xxxxOrOp
- Refactored some helper functions
- Modify data NumOps to include two fields: numAnd and numOr
Resolves: #20203
See also: #19204
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Judging from the Assumption, we should never call `roundingMode#` on a negative
number. Yet the strange "dummy" conversion from `IN` to `IP` and the following
recursive call where making the function recursive.
Replacing the call by a panic makes `roundingMode#` non-recursive, so that we
may be able to inline it.
Fixes #20352.
It seems we trigger #19414 on some jobs, hence
Metric Decrease:
T12545
|
|
|
|
|
|
| |
As noted in #18183, these cases were previously incorrect and unused.
Closes #18183.
|
|
|
|
|
| |
As noted in #20324, previously we would drop the fact that an unfolding
was evaluated, despite what the documentation claims.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this patch Integer and Natural literals were desugared into "real"
Core in Core prep. Now we desugar them directly into their final ConApp
form in HsToCore. We only keep the double representation for BigNat#
(literals larger than a machine Word/Int) which are still desugared in
Core prep.
Using the final form directly allows case-of-known-constructor to fire
for bignum literals, fixing #20245.
Slight increase (+2.3) in T4801 which is a pathological case with
Integer literals.
Metric Increase:
T4801
T11545
|
|
|
|
|
| |
None of the configure options defined by `FP_GMP` are applicable to
binary distributions.
|
| |
|
|
|
|
|
|
|
| |
The location of the plus symbol was being discarded, we now capture
it.
Closes #20243
|
|
|
|
| |
Just a small refactoring to perhaps enable code reuse later.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Fix markup in 9.4 release notes
- Document -ddump-cs-trace
- Mention that ImpredicativeTypes is really supported only since 9.2
- Remove "There are some restrictions on the use of unboxed tuples".
This used to be a list, but all those restrictions were removed.
- Mark -fimplicit-import-qualified as documented
- Remove "The :main and :run command" - duplicated verbatim in options
- Avoid calling "main" a function (cf. #7816)
- Update System.getArgs: the old location was before hierarchical modules
- Note that multiplicity multiplication is not supported (#20319)
|
|
|
|
| |
Fixes #20272
|
|
|
|
|
|
|
|
|
|
| |
The constraint was there in order to show the 'Integral' value in case
of error. Instead we can show the result of `toInteger`, which will be
close (i.e. it will still show the same integer except if the 'Show'
instance was funky).
This changes a bit runtime semantic (i.e. exception string may be a bit
different).
|
| |
|
|
|
| |
ie `succ (0000) == 0001` -- (not 1001)
|
|
|
|
|
|
| |
NCG needs to call slow FFI functions where we "borrow" the C compiler's
implementation, but there is no reason why we need to do that for LLVM,
or the unregisterized backend where everything is via C anyways!
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds the following constructors to the TcRnMessage type and
uses them to replace sdoc-based diagnostics in some parts of GHC (e.g.
TcRnUnknownMessage). It includes:
* Add TcRnMonomorphicBindings diagnostic
* Convert TcRnUnknownMessage in Tc.Solver.Interact
* Add and use the TcRnOrphanInstance constructor to TcRnMessage
* Add TcRnFunDepConflict and TcRnDupInstanceDecls constructors to TcRnMessage
* Add and use TcRnConflictingFamInstDecls constructor to TcRnMessage
* Get rid of TcRnUnknownMessage from GHC.Tc.Instance.Family
|
|
|
|
|
|
| |
As described in https://stackoverflow.com/questions/7577052,
safely expanding bash arrays is very-nearly impossible. The previous
incantation failed under the bash version shipped with Centos 7.
|