summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge HsInstances and HsInstances2wip/ttg5-data-one-file-2017-11-17Alan Zimmerman2017-11-176-189/+14
|
* WIP on splitting out Data instance generation for hsSyn ASTAlan Zimmerman2017-11-1714-88/+374
|
* configure: Fix incorrect quotingBen Gamari2017-11-161-1/+5
| | | | | This is a regression affecting Windows introduced by 3bed4aa703c41ccbd310496420fbb71afdfd99e7.
* Document -ddump-timingsBen Gamari2017-11-161-0/+5
|
* Detect overly long GC syncSimon Marlow2017-11-168-6/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: GC sync is the time between a GC being intiated and all the mutator threads finally stopping so that the GC can start. Problems that cause the GC sync to be delayed are hard to find and can cause dramatic slowdowns for heavily parallel programs. The new flag --long-gc-sync=<time> helps by emitting a warning and calling a user-overridable hook when the GC sync time exceeds the specified threshold. A debugger can be used to set a breakpoint when this happens and inspect the stacks of threads to find the culprit. Test Plan: ``` $ ./inplace/bin/ghc-stage2 +RTS --long-gc-sync=0.0000001 -S Alloc Copied Live GC GC TOT TOT Page Flts bytes bytes bytes user elap user elap 1135856 51144 153736 0.000 0.000 0.002 0.002 0 0 (Gen: 0) 1034760 94704 188752 0.000 0.000 0.002 0.002 0 0 (Gen: 0) 1038888 134832 228888 0.009 0.009 0.011 0.011 0 0 (Gen: 1) 1025288 90128 235184 0.000 0.000 0.012 0.012 0 0 (Gen: 0) 1049088 130080 333984 0.000 0.000 0.013 0.013 0 0 (Gen: 0) Warning: waited 0us for GC sync 1034424 73360 331976 0.000 0.000 0.013 0.013 0 0 (Gen: 0) ``` Also tested on a real production problem. Reviewers: niteria, bgamari, erikd Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4193
* Pull recent Hadrian changes from upstreamAndrey Mokhov2017-11-1512-66/+93
|\ | | | | | | Merge commit 'c1fcd9b3f60e8420dd228cd4e3efeb9cfa793aa5'
| * Squashed 'hadrian/' changes from 5ebb69a..fa3771fAndrey Mokhov2017-11-1512-66/+93
| | | | | | | | | | | | | | | | | | | | | | | | fa3771f hadrian: Disable -Wno-undef in files which include ffi.h (#459) f15e851 Do not run configure by default (#458) 5baa8db Fix AppVeyor cache failure (#456) 94dbe9d Fix ghc-cabal build (#455) a679764 Fix CI scripts (#454) 06ec241 Widen bounds on Cabal (#452) git-subtree-dir: hadrian git-subtree-split: fa3771fe6baf5008a8506fec48220f8347ac59af
* | users_guide: Fix "CancelSynchronousIo" casingNiklas Hambüchen2017-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | Reviewers: bgamari, angerman Reviewed By: angerman Subscribers: angerman, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4200
* | Adjust AltCon Ord instance to match Core linter requirements.klebinger.andreas@gmx.at2017-11-151-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When sorting by the Ord instance put DEFAULT before other constructors. This is in line with what the core linter requests allowing the use of the instance for putting alternatives in the correct order. This implements #14464. Reviewers: bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, thomie GHC Trac Issues: #14464 Differential Revision: https://phabricator.haskell.org/D4198
* | Cabalify all the thingsMoritz Angermann2017-11-153-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding cabal files to `unlit`, `touchy` and `hp2ps`, allows us to treat them uniformally across the build system. In particular Hadrian will use these. Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4192
* | Allow the rts lib to be called rts-1.0Moritz Angermann2017-11-151-0/+12
| | | | | | | | | | | | | | | | | | | | Reviewers: bgamari, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4187
* | rts: Fix gc timingDouglas Wilson2017-11-151-16/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were accumulating the gc times of the previous gc. `stats.gc.{cpu,elappsed}_ns` were being accumulated into `stats.gc_{cpu,elapsed}_ns` before they were set. There is also a change in that heap profiling will no longer cause gc events to be emitted. Reviewers: bgamari, erikd, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #14257, #14445 Differential Revision: https://phabricator.haskell.org/D4184
* | Add dump flag for timing outputBen Gamari2017-11-152-9/+21
| | | | | | | | | | | | | | | | | | | | | | This allows you to use `-ddump-to-file -ddump-timings` for more useful dump output. Test Plan: Try it Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4195
* | CLabels: Remove CaseLabelBen Gamari2017-11-151-32/+0
| | | | | | | | | | | | | | | | Reviewers: simonmar Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4188
* | CLabel: Clean up unused label typesBen Gamari2017-11-151-45/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Test Plan: Validate Reviewers: trommler, simonmar Reviewed By: trommler Subscribers: rwbarton, thomie GHC Trac Issues: #14454 Differential Revision: https://phabricator.haskell.org/D4182
* | RTS: Disable warnings in ffi.hPeter Trommler2017-11-154-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The update of GHC's in-tree libffi causes warnings about undefined macros and hence validate fails. Also mark broken tests that have a ticket. Fixes #14353 Test Plan: ./validate (on AIX and powerpc if possible) Reviewers: bgamari, hvr, erikd, simonmar Reviewed By: bgamari Subscribers: snowleopard, rwbarton, thomie GHC Trac Issues: #14353, #11259, #14455, #11261 Differential Revision: https://phabricator.haskell.org/D4181
* | Adds rts/rts.cabal.in fileMoritz Angermann2017-11-153-8/+471
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is in preparation for cabalification of the `rts`. To be actually able to parse this file, a rather recent Cabal is required. One after commit 357d49d of haskell/cabal. The relevant PR to support the new `asm-sources` and `cmm-sources` is haskell/cabal/pull/4857. Not that this does *not* allow cabal to build the RTS. It does however provide enough information such that cabal can `copy` and `register` the package properly in the package database, if all the build artifacts have been build properly. As such it does not require any custom handling of the `rts` package. As the rts as well as all the other packages built by the GHC built system are built outside of cabal anyway. Reviewers: bgamari, hvr, erikd, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie, erikd Differential Revision: https://phabricator.haskell.org/D4174
* | StaticPointers: Clarify documentationFacundo Domínguez2017-11-155-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Document requirement to use the same binaries. * Fix some code comments. Test Plan: ./validate Reviewers: bgamari, mboes, hvr Reviewed By: bgamari, mboes Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4172
* | Add new mbmi and mbmi2 compiler flagsJohn Ky2017-11-1522-1/+646
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the bit deposit and extraction operations provided by the BMI and BMI2 instruction set extensions on modern amd64 machines. Test Plan: Validate Reviewers: austin, simonmar, bgamari, hvr, goldfire, erikd Reviewed By: bgamari Subscribers: goldfire, erikd, trommler, newhoggy, rwbarton, thomie GHC Trac Issues: #14206 Differential Revision: https://phabricator.haskell.org/D4063
* | TTG3 Combined Step 1 and 3 for Trees That GrowAlan Zimmerman2017-11-1435-423/+640
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Further progress on implementing Trees that Grow on hsSyn AST. See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow Trees that grow extension points are added for - Rest of HsExpr.hs Updates haddock submodule Test Plan: ./validate Reviewers: bgamari, shayan-najd, goldfire Subscribers: goldfire, rwbarton, thomie, mpickering Differential Revision: https://phabricator.haskell.org/D4186
* | A bit more tc-tracingSimon Peyton Jones2017-11-142-2/+7
| |
* | Fix a TyVar bug in the flattenerSimon Peyton Jones2017-11-146-7/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A year ago I gave up on trying to rigorously separate TyVars from TcTyVars, and instead allowed TyVars to appear rather more freely in types examined by the constraint solver: commit 18d0bdd3848201882bae167e3b15fd797d217e93 Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Wed Nov 23 16:00:00 2016 +0000 Allow TyVars in TcTypes See Note [TcTyVars in the typechecker] in TcType. However, TcFlatten.flatten_tyvar1 turned out to treat a TyVar specially, and implicitly assumed that it could not have an equality constraint in the inert set. Wrong! This caused Trac #14450. Fortunately it is easily fixed, by deleting code.
* | WIP on combined Step 1 and 3 for Trees That Grow, HsExprAlan Zimmerman2017-11-1147-1081/+1451
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow Trees that grow extension points are added for - HsExpr Updates haddock submodule Test Plan: ./validate Reviewers: bgamari, goldfire Subscribers: rwbarton, thomie, shayan-najd, mpickering Differential Revision: https://phabricator.haskell.org/D4177
* | Declare proper spec version in `base.cabal`Herbert Valerio Riedel2017-11-111-1/+2
| | | | | | | | | | | | This is a follow-up to ba2ae2c8729d5aef2aeb7fb32d6c0ea2a465ea25 which started relying on a new Cabal feature requiring the the cabal spec version declaration to be updated accordingly.
* | circleci: Bump down thread countBen Gamari2017-11-111-1/+1
| | | | | | | | | | | | | | It appears that our jobs generally run on VMs with 2 vCPUs. Consequently running with 8 jobs will completely oversubscribe the machine. I suspect this is the cause of #14453. Let's bump this down to 3 for now. Ideally we would determine this from the environment.
* | Use LICENSE instead of ../LICENSE in the compiler.cabal fileMoritz Angermann2017-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4175
* | Adds cmm-sources to baseMoritz Angermann2017-11-113-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Bumps Cabal submodule. Reviewers: bgamari, hvr Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4176
* | Windows: Bump to GCC 7.2 for GHC 8.4Tamar Christina2017-11-112-40/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GHC 8.4 is expected to ship with an updated GCC bindist based on GCC 7.2. I am however at this time not updating the crt due to an issue introduced in September. https://sourceforge.net/p/mingw-w64/mailman/message/36085637/ Unless a favorable fix comes out of the discussion I will just ship the old crt with GHC 8.4. Test Plan: ./validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie, rwbarton Differential Revision: https://phabricator.haskell.org/D4125
* | Merge commit '5229c43ccf77bcbffeced01dccb27398d017fa34'Ben Gamari2017-11-106-19/+7
|\ \ | |/
| * Squashed 'hadrian/' changes from 438dc576e7..5ebb69ae1eBen Gamari2017-11-106-19/+7
| | | | | | | | | | | | | | 5ebb69ae1e Drop GccLtXX flags, require GCC > 4.7 and up (#450) git-subtree-dir: hadrian git-subtree-split: 5ebb69ae1eb063f25c59383bffb3b5449015c6f9
* | Fix PPC NCG after blockID patchPeter Trommler2017-11-095-20/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit rGHC8b007ab assigns the same label to the first basic block of a proc and to the proc entry point. This violates the PPC 64-bit ELF v. 1.9 and v. 2.0 ABIs and leads to duplicate symbols. This patch fixes duplicate symbols caused by block labels In commit rGHCd7b8da1 an info table label is generated from a block id. Getting the entry label from that info label leads to an undefined symbol because a suffix "_entry" that is not present in the block label. To fix that issue add a new info table label flavour for labels derived from block ids. Converting such a label with toEntryLabel produces the original block label. Fixes #14311 Test Plan: ./validate Reviewers: austin, bgamari, simonmar, erikd, hvr, angerman Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #14311 Differential Revision: https://phabricator.haskell.org/D4149
* | Change `OPTIONS_GHC -O` to `OPTIONS_GHC -O2`Douglas Wilson2017-11-096-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These pragmas were having the perverse effect of having these performance critical modules be LESS optimized in builds with -O2. Test Plan: Check on gipedia whether this is worthwhile. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4156
* | testsuite: Add test for #5889Douglas Wilson2017-11-093-2/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Test Plan: make test TEST=5889 Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #5889 Differential Revision: https://phabricator.haskell.org/D4158
* | Remove unreliable Core Lint empty case checksDavid Feuer2017-11-093-19/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trac #13990 shows that the Core Lint checks for empty case are unreliable, and very hard to make reliable. The consensus (among simonpj, nomeata, and goldfire) seems to be that they should be removed altogether. Do that. Add test Reviewers: goldfire, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13990 Differential Revision: https://phabricator.haskell.org/D4161
* | Update comment in GHC.Real (trac#14432)Bodigrim2017-11-091-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | Reviewers: hvr, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #14432 Differential Revision: https://phabricator.haskell.org/D4171
* | base: Fix #14425Ben Gamari2017-11-092-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Test Plan: Validate Reviewers: hvr Subscribers: rwbarton, thomie GHC Trac Issues: #14425 Differential Revision: https://phabricator.haskell.org/D4167
* | base: Normalize style of approxRationalBen Gamari2017-11-091-22/+25
| | | | | | | | | | | | | | | | | | | | | | | | Stumbled upon this odd bit of style while looking at #14425. Usually I don't like to do this sort of reformatting, but this seemed like it would be necessary in the course fo fixing #14425. Reviewers: hvr Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4168
* | base: Add test for #14425Ben Gamari2017-11-093-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | Test Plan: Validate Reviewers: hvr Subscribers: rwbarton, thomie GHC Trac Issues: #14425 Differential Revision: https://phabricator.haskell.org/D4166
* | Merge initial Hadrian snapshotBen Gamari2017-11-09112-0/+8898
|\ \ | | | | | | | | | | | | We will continue to pull in squashed snapshots periodically until we eventually discontinue development in Hadrian's GitHub repository.
| * \ Merge commit '7b0b9f603bb1215e2b7af23c2404d637b95a4988' as 'hadrian'Andrey Mokhov2017-11-06112-0/+8898
| |\ \ | | |/
| | * Squashed 'hadrian/' content from commit 438dc57Andrey Mokhov2017-11-06112-0/+8898
| | | | | | | | | | git-subtree-dir: hadrian git-subtree-split: 438dc576e7b84c473a09d1d7ec7798a30303bc4e
* | Update Win32 version for GHC 8.4.Tamar Christina2017-11-0916-17/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update to Win32 2.6 which is the expected version release for 8.4 This involves moving Cabal forward which brings some backwards incompatible changes that needs various fixups. Bump a bunch of submodules Test Plan: ./validate Reviewers: austin, bgamari, angerman Reviewed By: bgamari, angerman Subscribers: angerman, thomie, rwbarton Differential Revision: https://phabricator.haskell.org/D4133
* | testsuite: Fix output of T14394Ben Gamari2017-11-091-1/+7
| |
* | Remove left-overs from compareByteArray# inline conversionHerbert Valerio Riedel2017-11-093-16/+0
| | | | | | | | | | | | | | These removes left-overs from e3ba26f8b49700b41ff4672f3f7f6a4e453acdcc where I implemented `compareByteArray#` as an out-of-line primop, which got optimised into an inline primop shortly afterwards (as per 7673561555ae354fd9eed8de1e57c681906e2d49).
* | Invoke lintUnfolding only on top-level unfoldings (#14430)Joachim Breitner2017-11-082-20/+29
| | | | | | | | | | | | | | | | | | | | | | | | as nested unfoldings are linted together with the top-level unfolding, and lintUnfolding does the wrong things for nestd unfoldings that mention join points. The easiest way of doing that was to pass a TopLevel flag through `tcUnfolding`, which is invoked both for top level and nested unfoldings. Differential Revision: https://phabricator.haskell.org/D4169
* | WIP on Doing a combined Step 1 and 3 for Trees That GrowAlan Zimmerman2017-11-0858-1691/+2432
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow Trees that grow extension points are added for - ValBinds - HsPat - HsLit - HsOverLit - HsType - HsTyVarBndr - HsAppType - FieldOcc - AmbiguousFieldOcc Updates haddock submodule Test Plan: ./validate Reviewers: shayan-najd, simonpj, austin, goldfire, bgamari Subscribers: goldfire, rwbarton, thomie, mpickering Differential Revision: https://phabricator.haskell.org/D4147
* | Fix in-scope set in simplifierSimon Peyton Jones2017-11-083-25/+56
| | | | | | | | | | | | | | | | | | This patch fixes Trac #14408. The problem was that the StaticEnv field of an ApplyToVar or Select continuation didn't have enough variables in scope. The fix is simple, and I documented the invariant in Note [StaticEnv invariant] in SimplUtils. No change in behaviour: this just stops an ASSERT from tripping.
* | Minimise provided dictionaries in pattern synonymsSimon Peyton Jones2017-11-0829-114/+206
| | | | | | | | | | | | | | | | | | | | | | Trac #14394 showed that it's possible to get redundant constraints in the inferred provided constraints of a pattern synonym. This patch removes the redundancy with mkMinimalBySCs. To do this I had to generalise the type of mkMinimalBySCs slightly. And, to reduce confusing reversal, I made it stable: it now returns its result in the same order as its input. That led to a raft of error message wibbles, mostly for the better.
* | Fix another dark corner in the shortcut solverSimon Peyton Jones2017-11-084-34/+71
| | | | | | | | | | | | | | | | | | | | The shortcut solver for type classes (Trac #12791) was eagerly solving a constaint from an OVERLAPPABLE instance. It happened to be the only one in scope, so it was unique, but since it's specfically flagged as overlappable it's really a bad idea to solve using it, rather than using the Given dictionary. This led to Trac #14434, a nasty and hard to identify bug.
* | Imrpove comments about equality typesSimon Peyton Jones2017-11-082-12/+15
| |