summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* configure: Clarify meaning of CabalHaveLibffiBen Gamari2021-09-233-7/+3
| | | | | Previously the meaning of this flag was unclear and as a result I suspect that CabalHaveLibffi could be incorrectly False.
* configure: Fix copy/paste errorBen Gamari2021-09-231-1/+1
| | | | | | Previously both the --with-system-libffi path and the non--with-system-libffi path set CabalUseSystemLibFFI=True. This was wrong.
* hadrian: Pass CFLAGS to gmp configureGHC GitLab CI2021-09-231-0/+4
|
* gitlab-ci: bash fixesBen Gamari2021-09-231-3/+3
|
* Ensure that cabal update is invoked before buildingBen Gamari2021-09-231-2/+7
|
* gitlab-ci: Use correct CABAL executableBen Gamari2021-09-231-1/+1
|
* gitlab-ci: Ensure that CABAL_DIR is a Windows pathBen Gamari2021-09-231-2/+8
| | | | Otherwise cabal-install falls over.
* ci: Add version to cache keyBen Gamari2021-09-231-20/+21
|
* configure: Add check for whether CC supports --targetBen Gamari2021-09-233-1/+42
|
* configure: Move nm search logic to new fileBen Gamari2021-09-232-33/+41
|
* ci: More surgical use of nix in Darwin buildsBen Gamari2021-09-236-164/+337
|
* ci: Move phase timing logic into ci.shBen Gamari2021-09-232-101/+33
|
* ci: Isolate build from HOMEBen Gamari2021-09-232-15/+25
|
* ci: Consolidate handling of cabal cacheBen Gamari2021-09-232-10/+24
| | | | | | Previously the cache persistence was implemented as various ad-hoc `cp` commands at the end of the individual CI scripts. Here we move all of this logic into `ci.sh`.
* ci: Drop redundant `cabal update`sBen Gamari2021-09-232-5/+2
| | | | `cabal update` is already implied by `ci.sh setup`.
* Use Info Table Provenances to decode cloned stack (#18163)Sven Tennie2021-09-2340-205/+886
| | | | | | | | | | | | | | | | Emit an Info Table Provenance Entry (IPE) for every stack represeted info table if -finfo-table-map is turned on. To decode a cloned stack, lookupIPE() is used. It provides a mapping between info tables and their source location. Please see these notes for details: - [Stacktraces from Info Table Provenance Entries (IPE based stack unwinding)] - [Mapping Info Tables to Source Positions] Metric Increase: T12545
* Introduce stack snapshotting / cloning (#18741)Sven Tennie2021-09-2324-28/+650
| | | | | | | | | | | | | | Add `StackSnapshot#` primitive type that represents a cloned stack (StgStack). The cloning interface consists of two functions, that clone either the treads own stack (cloneMyStack) or another threads stack (cloneThreadStack). The stack snapshot is offline/cold, i.e. it isn't evaluated any further. This is useful for analyses as it prevents concurrent modifications. For technical details, please see Note [Stack Cloning]. Co-authored-by: Ben Gamari <bgamari.foss@gmail.com> Co-authored-by: Matthew Pickering <matthewtpickering@gmail.com>
* base: Generalize newStablePtrPrimMVarSven Tennie2021-09-231-2/+2
| | | | | Make it polymorphic in the type of the MVar's value. This simple generalization makes it usable for `MVar a` instead of only `MVar ()` values.
* deriveConstants: Add hie.yamlSven Tennie2021-09-231-0/+1
|
* Typo [skip ci]wip/typo-cgMatthew Pickering2021-09-231-1/+1
|
* Remove unused, undocumented debug/dump flag `-ddump-vt-trace`. See 20403.Benjamin Maurer2021-09-223-5/+0
|
* Fix minor inconsistency in documentationalirezaghey2021-09-221-2/+2
| | | | fixes #20388
* Link with libm dynamically (#19877)Sylvain Henry2021-09-2211-10/+26
| | | | The compiler should be independent of the target.
* Convert Diagnostics in GHC.Tc.Gen.* (Part 2)Aaron Allen2021-09-224-114/+330
| | | | | | Converts diagnostics in: (#20116) - GHC.Tc.Gen.Default - GHC.Tc.Gen.Export
* Clarify that malloc, free etc. are the ones from stdlib.hOleg Grenrus2021-09-221-0/+5
|
* hadrian: Disable verbose timing informationMatthew Pickering2021-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Before the output contain a lot of verbose information about timining various things to do with shake which wasn't so useful for developers. ``` shakeArgsWith 0.000s 0% Function shake 0.010s 0% Database read 0.323s 12% === With database 0.031s 1% Running rules 2.301s 86% ========================= Pool finished (1786 threads, 5 max) 0.003s 0% Cleanup 0.000s 0% Total 2.669s 100% Build completed in 2.67s ``` Now the output just contains the last line ``` Build completed in 2.67s ``` Ticket #20381
* users-guide: Improve documentation of ticky eventsBen Gamari2021-09-183-1/+13
|
* deriving: Always use module prefix in dataTypeNameMatthew Pickering2021-09-187-51/+81
| | | | | | | | | | | This fixes a long standard bug where the module prefix was omitted from the data type name supplied by Data.Typeable instances. Instead of reusing the Outputable instance for TyCon, we now take matters into our own hands and explicitly print the module followed by the type constructor name. Fixes #20371
* docs: Fix examples for (un)escapeArgsMatthew Pickering2021-09-181-2/+2
| | | | | | | | | The examples were just missing the surrounding brackets. ghci> escapeArgs ["hello \"world\""] "hello\\ \\\"world\\\"\n" Fixes #20340
* Fix formatting of link in base/Type.ReflectionJoaquin "Florius" Azcarate2021-09-181-2/+1
|
* CoreUtils: Make exprIsHNF return True for unlifted variables (#20140)Sebastian Graf2021-09-181-0/+2
| | | | | | Clearly, evaluating an unlifted variable will never perform any work. Fixes #20140.
* WorkWrap: Update Note [Wrapper activation] (#15056)Sebastian Graf2021-09-183-25/+33
| | | | | | | | | | | The last point of the Conclusion was wrong; we inline functions without pragmas after the initial phase. It also appears that #15056 was fixed, as there already is a test T15056 which properly does foldr/build fusion for the reproducer. I made sure that T15056's `foo` is just large enough for WW to happen (which it wasn't), but for the worker to be small enough to inline into `blam`. Fixes #15056.
* Add more instances for SoloDavid Feuer2021-09-187-5/+42
| | | | | | | | | Oleg Grenrus pointed out that `Solo` was missing `Eq`, `Ord`, `Bounded`, `Enum`, and `Ix` instances, which were all apparently available for the `OneTuple` type (in the `OneTuple` package). Though only the first three really seem useful, there's no reason not to take them all. For `Ix`, `Solo` naturally fills a gap between `()` and `(,)`.
* Testsuite: Mark T12903 as fragile on i386Matthew Pickering2021-09-171-0/+1
| | | | Closes #20377
* Constant folding for ctz/clz/popCnt (#20376)Sylvain Henry2021-09-174-0/+142
|
* Use an ADT for RecompReasonSylvain Henry2021-09-175-57/+116
|
* Refactor module dependencies codeSylvain Henry2021-09-1715-196/+216
| | | | | | * moved deps related code into GHC.Unit.Module.Deps * refactored Deps module to not export Dependencies constructor to help maintaining invariants
* Fix annoying warning about Data.List unqualified importSylvain Henry2021-09-171-1/+1
|
* Code Gen: Rewrite shortcutWeightMap more efficientlyMatthew Pickering2021-09-171-33/+53
| | | | | | | | | | | | 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
* Code Gen: Use more efficient block merging algorithmMatthew Pickering2021-09-173-27/+109
| | | | | | | | | | | | | | | | | | 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
* Code Gen: Optimise successors calculation in loop calculationMatthew Pickering2021-09-171-5/+4
| | | | | | | | | | 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
* Code Gen: Replace another lazy fmap with strict mapMapMatthew Pickering2021-09-171-1/+1
|
* Code Gen: Use strict map rather than lazy map in loop analysisMatthew Pickering2021-09-171-1/+3
| | | | | | | | | | | 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
* Add doc for -dyno, -dynosuf, -dynhisufZiyang Liu2021-09-172-3/+26
|
* Add "ipe" flavour transformer to add support for building with IPE debug infoMatthew Pickering2021-09-172-0/+18
| | | | | | 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.
* compiler: Ensure that all CoreTodos have SCCsBen Gamari2021-09-172-3/+5
| | | | | | 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.
* ghc-boot: Fix metadata handling of writeFileAtomicBen Gamari2021-09-172-0/+28
| | | | | | | | Previously the implementation of writeFileAtomic (which was stolen from Cabal) failed to preserve file mode, user and group, resulting in #14017. Fixes #14017.
* testsuite: Add broken testcase for #19350Ben Gamari2021-09-178-0/+87
|
* Remove Cabal dependency from check-exact and check-ppr executablesMatthew Pickering2021-09-172-2/+0
| | | | Neither uses anything from Cabal, so the dependency can just be removed.
* driver: Clean up temporary files after a module has been compiledMatthew Pickering2021-09-171-2/+8
| | | | | | | | | 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