summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* PmCheck: Elaborate what 'model' means in the user guide [skip ci]wip/MR1752-leftoversSebastian Graf2019-09-271-8/+14
|
* Remove unneeded CPP now that GHC 8.6 is the minimumRyan Scott2019-09-254-27/+0
| | | | | | | The minimum required GHC version for bootstrapping is 8.6, so we can get rid of some unneeded `#if `__GLASGOW_HASKELL__` CPP guards, as well as one `MIN_VERSION_ghc_prim(0,5,3)` guard (since GHC 8.6 bundles `ghc-prim-0.5.3`).
* base: Move Ix typeclass to GHC.IxBen Gamari2019-09-2513-358/+383
| | | | | The `Ix` class seems rather orthogonal to its original home in `GHC.Arr`.
* PmCheck: Only ever check constantly many models against a single patternSebastian Graf2019-09-2516-274/+278
| | | | | | | | | | | | | | | | | | | | | | | | | Introduces a new flag `-fmax-pmcheck-deltas` to achieve that. Deprecates the old `-fmax-pmcheck-iter` mechanism in favor of this new flag. From the user's guide: Pattern match checking can be exponential in some cases. This limit makes sure we scale polynomially in the number of patterns, by forgetting refined information gained from a partially successful match. For example, when matching `x` against `Just 4`, we split each incoming matching model into two sub-models: One where `x` is not `Nothing` and one where `x` is `Just y` but `y` is not `4`. When the number of incoming models exceeds the limit, we continue checking the next clause with the original, unrefined model. This also retires the incredibly hard to understand "maximum number of refinements" mechanism, because the current mechanism is more general and should catch the same exponential cases like PrelRules at the same time. ------------------------- Metric Decrease: T11822 -------------------------
* includes/CodeGen.Platform.hs don't include ghcautoconf.hJohn Ericson2019-09-251-1/+0
| | | | | It doesn't need it, and it shouldn't need it or else multi-target will break.
* Add -Wderiving-defaults (#15839)Kari Pahula2019-09-259-4/+59
| | | | | | Enabling both DeriveAnyClass and GeneralizedNewtypeDeriving can cause a warning when no explicit deriving strategy is in use. This change adds an enable/suppress flag for it.
* Add ghcide configuration filesMatthew Pickering2019-09-243-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds three new files 1. A hie.yaml file to the project root which specifies to IDEs how to set up the correct environment for loading GHC. This currently specifies to call the `./hadrian/hie-bios` script. 2. A `hie.yaml` file for the hadrian subcomponent, which uses the `cabal` cradle type. 2. The `./hadrian/hie-bios` script which supplies the correct arguments for an IDE to start a session. With these two files it is possible to run ``` ghcide compiler/ ``` and successfully load all the modules for use in the IDE. or ``` ghcide --cwd hadrian/ src/ ``` to test loading all of Hadrian's modules. Closes #17194
* Fix bounds check in ocResolve_PEi386 for relocation values.Andreas Klebinger2019-09-241-2/+2
| | | | | | | | The old test was wrong at least for gcc and the value -2287728808L. It also relied on implementation defined behaviour (right shift on a negative value), which might or might not be ok. Either way it's now a simple comparison which will always work.
* testsuite: Mark threadstatus-9333 as fragile in profthreadedBen Gamari2019-09-241-1/+1
| | | | Due to #16555.
* hadrian: Update source-repositoryBen Gamari2019-09-241-1/+1
|
* gitlab-ci: Bump ci-imagesBen Gamari2019-09-241-1/+1
| | | | | This bumps the CI Docker images to ghc/ci-images@990c5217d1d0e03aea415f951afbc3b1a89240c6.
* base: Add link to "A reflection on types"Ben Gamari2019-09-241-0/+1
| | | | Fixes #17181.
* Fix some duplication in the parserSebastian Graf2019-09-241-20/+4
| | | | | | | | | | | | | | | | | | | | | | D3673 experienced reduce/reduce conflicts when trying to use opt_instance for associated data families. That was probably because the author tried to use it for Haskell98-syntax without also applying it to GADT-syntax, which actually leads to a reduce/reduce conflict. Consider the following state: ``` data . T = T data . T where T :: T ``` The parser must decide at this point whether or not to reduce an empty `opt_instance`. But doing so would also commit to either Haskell98 or GADT syntax! Good thing we also accept an optional "instance" for GADT syntax, so the `opt_instance` is there in both productions and there's no reduce/reduce conflict anymore. Also no need to inline `opt_instance`, how it used to be.
* Hadrian: Add -haddock option for GHCi's :doc commandTakenobu Tani2019-09-242-2/+2
| | | | | | | | | | | | | | This commit adds -haddock option to Hadrian-based build system. To enable :doc command on GHCi, core libraries must be compiled with -haddock option. Especially, the `-haddock` option is essential for a release build. Assuming current GitLab CI condition (.gitlab-ci.yml), I add -haddock option to the default flavour only. This has already been done for Make-based build system. Please see #16415.
* Some leftovers from !1732. Comments only [skip ci]Sebastian Graf2019-09-242-3/+4
|
* Add -fkeep-going to make compiler continue despite errors (#15424)Kari Pahula2019-09-2315-3/+103
| | | | | Add a new optional failure handling for upsweep which continues the compilation on other modules if any of them has errors.
* [hadrian] Rebuild programs on dynamicGhcPrograms/ghcProfiled changeArtem Pyanykh2019-09-2310-20/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if you change these ^ flavour parameters, rebuilding is not triggered, since `programContext` doesn't set up a dependency on those values. Exposing these values via an oracle does set the dependency and properly triggers a rebuild of binaries. Several attempts to factor out these actions ended up in cyclic dependency here or there. I'm not absolutely happy with this variant either, but at least it works. ==== Issue repro: In UserSettings.hs: ``` dbgDynamic = defaultFlavour { name = "dbg-dynamic" , dynamicGhcPrograms = pure True, ... } dbgStatic = defaultFlavour { name = "dbg-static" , dynamicGhcPrograms = pure False ... } ``` Then in console: ``` $ hadrian/build.sh -j --flavour=dbg-dynamic ... does the build $ hadrian/build.sh -j --flavour=dbg-static ... does nothing, considers binaries up to date ```
* sort-paragraphs in runBuilderWithBjörn Gohla2019-09-231-11/+13
|
* alphabetical orderingBjörn Gohla2019-09-231-4/+4
|
* explicit dependence on makeinfoBjörn Gohla2019-09-233-5/+13
|
* detect makeinfo in configure(.ac)Björn Gohla2019-09-231-1/+12
|
* use the Make builder instead of raw cmd_Björn Gohla2019-09-231-1/+5
|
* add Hadrian rule to build user guide as Info bookBjörn Gohla2019-09-235-3/+27
|
* base: add newtypes for socklen_t and ndfs_t to System.Posix.Types #16568Adam Sandberg Eriksson2019-09-235-6/+33
| | | | | | Metric Increase: haddock.base T4029
* users-guide: Fix links and formats for GHC 8.10Takenobu Tani2019-09-237-24/+24
| | | | | | This commit only fixes links and markdown syntax. [skip ci]
* gitlab-ci: Fix URL of Windows cabal-install tarballBen Gamari2019-09-231-1/+1
|
* rts: TraverseHeap: Add doc comment for getTraverseStackMaxSizeDaniel Gröber2019-09-221-0/+3
|
* rts: RetainerProfile: Explain retainVisitClosure return valuesDaniel Gröber2019-09-221-3/+3
| | | | [ci skip]
* rts: TraverseHeap: Move stackElement.cp back into nextPos unionDaniel Gröber2019-09-221-6/+7
| | | | | The 'cp' field really is only used when type==posTypeFresh so it's more space efficient to have it in the nextPos union.
* rts: TraverseHeap: Make pushStackElement argument constDaniel Gröber2019-09-221-4/+4
|
* rts: TraverseHeap: Make comment style consistentDaniel Gröber2019-09-222-60/+64
|
* rts: Split heap traversal from retainer profilerDaniel Gröber2019-09-223-1353/+1372
| | | | | This finally moves the newly generalised heap traversal code from the retainer profiler into it's own file.
* rts: RetainerProfile.c: Minimize #includesDaniel Gröber2019-09-221-8/+1
| | | | | A lot of these includes are presumably leftovers from when the retainer profiler still did it's own heap profiling.
* rts: RetainerProfile.c: Re-enable and fix warningsDaniel Gröber2019-09-224-12/+13
| | | | | | Turns out some genius disabled warnings for RetainerProfile.c in the build system. That would have been good to know about five silent type mismatch crashes ago.. :)
* rts: retainer: Improve Note [Profiling heap traversal visited bit]Daniel Gröber2019-09-221-20/+20
|
* rts: retainer: Make visit callback easier to implementDaniel Gröber2019-09-222-17/+25
| | | | | | | | | Currently it is necessary for user code to expend at least one extra bit in the closure header just to know whether visit() should return true or false, to indicate if children should be traversed. The generic traversal code already has this information in the visited bit so simply pass it to the visit callback.
* rts: retainer: Move mut_list reset to generic traversal codeDaniel Gröber2019-09-221-40/+33
|
* rts: retainer: Remove traverse-stack chunk supportDaniel Gröber2019-09-222-46/+7
| | | | | | | | | | | | | | | | | | There's simply no need anymore for this whole business. Instead of individually traversing roots in retainRoot() we just push them all onto the stack and traverse everything in one go. This feature was not really used anyways. There is an `ASSERT(isEmptyWorkStack(ts))` at the top of retainRoot() which means there really can't ever have been any chunks at the toplevel. The only place where this was probably used is in traversePushStack but only way back when we were still using explicit recursion on the C callstack. Since the code was changed to use an explicit traversal-stack these stack-chunks can never escape one call to traversePushStack anymore. See commit 5f1d949ab9 ("Remove explicit recursion in retainer profiling")
* rts: retainer: Move actual 'flip' bit flip to generic traversal codeDaniel Gröber2019-09-221-3/+5
|
* rts: retainer: Update obsolete docs for traverseMaybeInitClosureDataDaniel Gröber2019-09-221-14/+6
|
* rts: retainer: Abstract maxStackSize for generic traversalDaniel Gröber2019-09-222-3/+11
|
* rts: retainer: Move heap traversal declarations to new headerDaniel Gröber2019-09-223-96/+128
|
* rts: retainer: Use global STATIC_INLINE macroDaniel Gröber2019-09-221-25/+18
| | | | | STATIC_INLINE already does what the code wanted here, no need to duplicate the functionality here.
* rts: retainer: Remove outdated invariants on traversePushStackDaniel Gröber2019-09-221-8/+0
| | | | | | These invariants don't seem to make any sense in the current code. The text talks about c_child_r as if it were an StgClosure, for which RSET() would make sense, but it's a retainer aka 'CostCentreStack*'.
* rts: retainer: Cleanup comments and strings for traversal extractionDaniel Gröber2019-09-221-95/+137
| | | | | A lot of comments and strings are still talking about old names, fix that.
* rts: retainer: Reduce DEBUG_RETAINER ifdef noiseDaniel Gröber2019-09-224-69/+39
| | | | | | | | | | Keeping track of the maximum stack seems like a good idea in all configurations. The associated ASSERTs only materialize in debug mode but having the statistic is nice. To make the debug code less prone to bitrotting I introduce a function 'debug()' which doesn't actually print by default and is #define'd away only when the standard DEBUG define is off.
* rts: retainer: Rename heap traversal functions for extractionDaniel Gröber2019-09-223-105/+104
| | | | | This gets all remaining functions in-line with the new 'traverse' prefix and module name.
* rts: retainer: Remove obsolete debug codeDaniel Gröber2019-09-221-330/+1
| | | | | | | Commit dbef766ce7 ("Profiling cleanup.") made this debug code obsolete by removing the 'cost' function without a replacement. As best I can tell the retainer profiler used to do some heap census too and this debug code was mainly concerned with that.
* rts: RetainerSet: Remove obsolete fist/second-approach choiceDaniel Gröber2019-09-223-69/+2
| | | | | | | | | | | | | In the old code when DEBUG_RETAINER was set, FIRST_APPROACH is implied. However ProfHeap.c now depends on printRetainerSetShort which is only available with SECOND_APPROACH. This is because with FIRST_APPROACH retainerProfile() will free all retainer sets before returning so by the time ProfHeap calls dumpCensus the retainer set pointers are segfaulty. Since all of this debugging code obviously hasn't been compiled in ages anyways I'm taking the liberty of just removing it. Remember guys: Dead code is a liability not an asset :)
* rts: Add note reference to SET_PROF_HDR for profiling 'flip' bitDaniel Gröber2019-09-221-0/+2
|