summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update test suite output due to #14691wip/14691Joachim Breitner2018-01-252-3/+5
|
* Merge remote-tracking branch 'origin/master' into wip/14691Joachim Breitner2018-01-2575-255/+1434
|\
| * Fix the lone-variable case in callSiteInlineSimon Peyton Jones2018-01-252-34/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See Note [Lone variables] in CoreUnfold and Note [exprIsExpandable] in CoreUtils. Helpfully pointed out by Matthew Pickering in Trac #14688 Nofib results are good: -------------------------------------------------------------------------------- Program Size Allocs Runtime Elapsed TotalMem -------------------------------------------------------------------------------- anna +0.1% +0.3% 0.151 0.151 0.0% awards +0.0% -0.2% 0.001 0.001 0.0% compress2 +0.6% -0.7% -4.8% -5.0% -4.0% eliza +0.0% -2.4% 0.001 0.001 0.0% fulsom +0.4% -13.3% -7.6% -7.6% +190.0% gamteb +0.0% -0.6% 0.062 0.062 0.0% gg +0.1% -0.4% 0.016 0.016 0.0% ida +0.1% +0.3% 0.110 0.110 0.0% kahan +0.0% -0.7% -0.9% -0.9% 0.0% mate +0.1% -5.2% -4.9% -4.9% 0.0% n-body +0.0% -0.2% -0.3% -3.0% 0.0% pretty +0.0% -2.8% 0.000 0.000 0.0% scs +0.0% -0.2% +1.6% +2.4% 0.0% simple +0.4% -0.2% -2.3% -2.3% -3.4% veritas +0.4% -1.0% 0.003 0.003 0.0% wang +0.0% -1.6% 0.165 0.165 0.0% -------------------------------------------------------------------------------- Min -0.0% -13.3% -16.2% -18.8% -4.0% Max +0.6% +0.3% +4.9% +4.9% +190.0% Geometric Mean +0.1% -0.3% -1.7% -2.4% +0.9%
| * Comments onlySimon Peyton Jones2018-01-251-3/+3
| |
| * Remove dead code: mkNthCoRoleSimon Peyton Jones2018-01-251-10/+1
| |
| * Comments about CoercionHolesSimon Peyton Jones2018-01-252-18/+44
| | | | | | | | Richard was confused; I hope these comments help.
| * Allocate less in plus_mod_depBartosz Nitka2018-01-232-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gives a 10% allocation improvement on MultiLayerModules. The idea is to reuse existing tuples, instead of constantly constructing new ones. Test Plan: ./validate Reviewers: simonpj, bgamari Reviewed By: simonpj, bgamari Subscribers: rwbarton, thomie, simonmar, carter Differential Revision: https://phabricator.haskell.org/D4332
| * Pass -dsuppress-uniques when running T14507Ryan Scott2018-01-222-2/+2
| | | | | | | | | | Not doing so resulted in different uniques being printed on different environments, as shown in #14703.
| * Improve comments about TcLevel invariantsSimon Peyton Jones2018-01-223-17/+31
| |
| * Bump transformers submodule to 0.5.5.0Ben Gamari2018-01-211-0/+0
| |
| * Update Cabal submoduleOleg Grenrus2018-01-216-39/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Cabal-2.2 uses SPDX license identifiers, so I had to update `cabal-version: 2.1` packages `license: BSD3` to `license: BSD-3-Clause` - `ghc-cabal` used old ReadP parsec, now it uses `parsec` too - InstalledPackageInfo pretty-printing have changed a little, fields with default values aren't printed. This can be changed in `Cabal` still, but I haven't found problems with omitting them. Note: `BSD-3-Clause` is parsed as "name = BSD, version = 3" by old parser (because 3-Clause looks like version 3 with tag Clause). If you see *"BSD-3" is not a valid license*, then something is using old parser still. Fixes #9885.
| * SysTools: Add detection support for LLD linkerBen Gamari2018-01-212-0/+5
| | | | | | | | | | | | I noticed while trying to test against LLVM 5.0 that GHC would throw "Couldn't figure out linker information" warnings due to LLD being chosen by configure. Adding detection support to silence these is simple enough, let's just do it.
| * Use IntSet in DataflowBartosz Nitka2018-01-213-23/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, a list was used as a substitute for a heap. This led to quadratic behavior on a simple program (see new test case). This change replaces it with IntSet in effect reverting 5a1a2633553. @simonmar said it's fine to revert as long as nofib results are good. Test Plan: new test case: 20% improvement 3x improvement when N=10000 nofib: I run it twice for before and after because the compile time results are noisy. - Compile Allocations: ``` before before re-run after after re-run -1 s.d. ----- -0.0% -0.1% -0.1% +1 s.d. ----- +0.0% +0.1% +0.1% Average ----- +0.0% -0.0% -0.0% ``` - Compile Time: ``` before before re-run after after re-run -1 s.d. ----- -0.1% -2.3% -2.6% +1 s.d. ----- +5.2% +3.7% +4.4% Average ----- +2.5% +0.7% +0.8% ``` I checked each case and couldn't find consistent slow-down/speed-up on compile time. Full results here: P173 Reviewers: simonpj, simonmar, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter, simonmar GHC Trac Issues: #14667 Differential Revision: https://phabricator.haskell.org/D4329
| * Implement underscores in numeric literals (NumericUnderscores extension)Takenobu Tani2018-01-2121-45/+469
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the proposal of underscores in numeric literals. Underscores in numeric literals are simply ignored. The specification of the feature is available here: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/000 9-numeric-underscores.rst For a discussion of the various choices: https://github.com/ghc-proposals/ghc-proposals/pull/76 Implementation detail: * Added dynamic flag * `NumericUnderscores` extension flag is added for this feature. * Alex "Regular expression macros" in Lexer.x * Add `@numspc` (numeric spacer) macro to represent multiple underscores. * Modify `@decimal`, `@decimal`, `@binary`, `@octal`, `@hexadecimal`, `@exponent`, and `@bin_exponent` macros to include `@numspc`. * Alex "Rules" in Lexer.x * To be simpler, we have only the definitions with underscores. And then we have a separate function (`tok_integral` and `tok_frac`) that validates the literals. * Validation functions in Lexer.x * `tok_integral` and `tok_frac` functions validate whether contain underscores or not. If `NumericUnderscores` extensions are not enabled, check that there are no underscores. * `tok_frac` function is created by merging `strtoken` and `init_strtoken`. * `init_strtoken` is deleted. Because it is no longer used. * Remove underscores from target literal string * `parseUnsignedInteger`, `readRational__`, and `readHexRational} use the customized `span'` function to remove underscores. * Added Testcase * testcase for NumericUnderscores enabled. NumericUnderscores0.hs and NumericUnderscores1.hs * testcase for NumericUnderscores disabled. NoNumericUnderscores0.hs and NoNumericUnderscores1.hs * testcase to invalid pattern for NumericUnderscores enabled. NumericUnderscoresFail0.hs and NumericUnderscoresFail1.hs Test Plan: `validate` including the above testcase Reviewers: goldfire, bgamari Reviewed By: bgamari Subscribers: carter, rwbarton, thomie GHC Trac Issues: #14473 Differential Revision: https://phabricator.haskell.org/D4235
| * [rts] Adjust whitehole_spinDouglas Wilson2018-01-215-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename to whitehole_gc_spin, in preparation for adding stats for the whitehole busy-loop in SMPClosureOps. Make whitehole_gc_spin volatile, and move it to be defined and statically initialised in GC.c. This saves some #ifs, and I'm pretty sure it should be volatile. Test Plan: ./validate Reviewers: bgamari, erikd, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4300
| * tentative improvement to callstack docsAlp Mestanogullari2018-01-212-24/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an attempt at clarifying the docs for HasCallStack in both the user guide and libraries/base/GHC/Stack/Types.hs. The example used right now is built around an hypothetical 'error' function that doesn't itself print call stacks, and the fact that this doesn't hold makes it all confusing, see #14635. Reviewers: hvr, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter GHC Trac Issues: #14635 Differential Revision: https://phabricator.haskell.org/D4317
| * Fix #14692 by correcting an off-by-one error in TcGenDerivRyan Scott2018-01-212-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A silly mistake in `gen_Show_binds` was causing derived `Show` instances for empty data types to case on the precedence argument instead of the actual value being showed. Test Plan: make test TEST=drv-empty-data Reviewers: bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter GHC Trac Issues: #14692 Differential Revision: https://phabricator.haskell.org/D4328
| * testsuite: Add testcase for #14670Ben Gamari2018-01-212-0/+12
| | | | | | | | | | | | | | | | Subscribers: rwbarton, thomie, carter GHC Trac Issues: #14670 Differential Revision: https://phabricator.haskell.org/D4314
| * Add new mbmi and mbmi2 compiler flagsJohn Ky2018-01-2123-21/+623
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the bit deposit and extraction operations provided by the BMI and BMI2 instruction set extensions on modern amd64 machines. Implement x86 code generator for pdep and pext. Properly initialise bmiVersion field. pdep and pext test cases Fix pattern match for pdep and pext instructions Fix build of pdep and pext code for 32-bit architectures Test Plan: Validate Reviewers: austin, simonmar, bgamari, angerman Reviewed By: bgamari Subscribers: trommler, carter, angerman, thomie, rwbarton, newhoggy GHC Trac Issues: #14206 Differential Revision: https://phabricator.haskell.org/D4236
| * testsuite: Add test for #14335Ben Gamari2018-01-182-0/+11
| | | | | | | | | | | | | | | | Subscribers: rwbarton, thomie GHC Trac Issues: #14335 Differential Revision: https://phabricator.haskell.org/D4202
* | s,ctEvTerm,ctEvExpr,gJoachim Breitner2018-01-255-15/+15
| |
* | Avoid exprType in evSuperClass, it does not work pre-zonkingJoachim Breitner2018-01-232-13/+5
| | | | | | | | | | but luckily mkEvScSelectors, the only caller of evSuperClass, knows the Class and the arguments.
* | Fix TcPluginMJoachim Breitner2018-01-221-2/+2
| |
* | Remove EvCallStackJoachim Breitner2018-01-229-89/+66
| | | | | | | | | | | | | | and move code from the desugarer into the type checker. Also, use EvExpr instead of EvTerm where possible (i.e. where no EvTypeable has to reach).
* | Use EvExpr instead of EvTerm where possibleJoachim Breitner2018-01-226-23/+22
| | | | | | | | to clutter the code less with calls to the EvExpr constructors.
* | Forgot zonkEvTerm env (EvCallStack ty cs)Joachim Breitner2018-01-221-0/+7
| |
* | Trying to add EvTypeable back to to EvTerm (checkpoint)Joachim Breitner2018-01-2216-274/+262
| | | | | | | | | | | | | | | | but without the other constructors. This is trying to include an EvCallStack constructor, but it turns out that `solveCallStack` in `TcCanonical` tries to wrap that in an `mkEvCast`. So lets defer this casting until the desugarer runs.
* | Start over with #14691 and only add EvExpr to EvTermJoachim Breitner2018-01-2217-234/+243
| | | | | | | | | | | | | | | | | | | | this can be useful for typechecker plugins, without disrupting the architecture of where Typeable evidence is created in the desgurar, not the typechecker. Some of the non-recursive constructors, such as `EvDelayedError` or `EvLit`, could possibly be dropped in favor of storing the `CoreExpr` directory. But there is not much to be gained from that.
* | Trying to add EvTypeableTyLit back to to EvTerm (broken checkpoint)Joachim Breitner2018-01-229-121/+152
| | | | | | | | | | but this means that an EvTerm can no longer occur nested in an CoreExpr representing an EvTerm, so this approach is kinda doomed.
* | Revert "Implement evTypeable"Joachim Breitner2018-01-226-163/+158
| | | | | | | | | | This reverts commit 34d283c76da071268b8f23a644f3d765cc9ec5bc. Lets somehow keep this in the desugarer.
* | Try using tcLookupId instead of lookupIdJoachim Breitner2018-01-221-11/+10
| | | | | | | | (the latter goes through tcLookupGlobal)
* | Try using tcLookup instead of tcLookupGlobalJoachim Breitner2018-01-214-25/+37
| |
* | Revert "use tcLookupGlobal in TcS’s MonadThings instance"Joachim Breitner2018-01-211-3/+2
| | | | | | | | | | This reverts commit 428f4f2f2563908b531374aed7016a222ad04a7f, which was pretty pointless, and did not help.
* | use tcLookupGlobal in TcS’s MonadThings instanceJoachim Breitner2018-01-211-2/+3
| |
* | Implement evTypeableJoachim Breitner2018-01-213-137/+131
| | | | | | | | | | which requires mild refactoring in TcInteract, as lir_mk_ev is now monadic
* | Remove Note [Memoising typeOf]Joachim Breitner2018-01-211-9/+0
| | | | | | | | its reference (and presumably relevance) was removed in 8fa4bf9.
* | Implement evCallStackJoachim Breitner2018-01-214-51/+52
| |
* | Implement zonkCoreExprJoachim Breitner2018-01-211-54/+63
| |
* | With EvTerm = CoreExpr, there is no need for a EvLit data typeJoachim Breitner2018-01-203-76/+63
| |
* | Implement evLitJoachim Breitner2018-01-203-10/+12
| | | | | | | | | | but really, the whole EvLit data type is now obsolete, as it just defers the construction of Core from matchKnownSymbol to makeLitDict.
* | Implement the pure evTerm smart constructorsJoachim Breitner2018-01-206-47/+65
| | | | | | | | | | and move some of them with heavier dependencies to TcEvTerm (otherwise we’d get module import cycles).
* | wip: type EvTerm = CoreExpr (#14691)Joachim Breitner2018-01-1915-123/+132
|/ | | | | | | | | | This replaces the constructors with smart constructors. Next steps * copy the actual implementation from DsBinds to TcEvidence (or better, into a separate module EvTerm). * implement zoking for core expressions
* Fix #14681 and #14682 with precision-aimed parenthesesRyan Scott2018-01-1812-10/+334
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out that `Convert` was recklessly leaving off parentheses in two places: * Negative numeric literals * Patterns in lambda position This patch fixes it by adding three new functions, `isCompoundHsLit`, `isCompoundHsOverLit`, and `isCompoundPat`, and using them in the right places in `Convert`. While I was in town, I also sprinkled `isCompoundPat` among some `Pat`-constructing functions in `HsUtils` to help avoid the likelihood of this problem happening in other places. One of these places is in `TcGenDeriv`, and sprinkling `isCompountPat` there fixes #14682 Test Plan: make test TEST="T14681 T14682" Reviewers: alanz, goldfire, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, carter GHC Trac Issues: #14681, #14682 Differential Revision: https://phabricator.haskell.org/D4323
* Remove unused extern cost centre collectionÖmer Sinan Ağacan2018-01-185-18/+14
| | | | | | | | | | Reviewers: bgamari, simonmar Reviewed By: simonmar Subscribers: alexbiehl, rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4309
* cmm: Include braces on default branch as required by the parserklebinger.andreas@gmx.at2018-01-181-2/+2
| | | | | | | | | | | | Test Plan: Looking at cmm-dump Reviewers: bgamari, simonmar Reviewed By: simonmar Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4293
* Revert "Improve accuracy of get/setAllocationCounter"Ben Gamari2018-01-1811-74/+34
| | | | This reverts commit a1a689dda48113f3735834350fb562bb1927a633.
* Revert "Fix regression on i386 due to get/setAllocationCounter change"Ben Gamari2018-01-181-2/+2
| | | | This reverts commit a770226e03f09b767fdb4ce826162a5c0f29ec29.
* Inform hole substitutions of typeclass constraints (fixes #14273).Matthías Páll Gissurarson2018-01-1825-155/+1499
| | | | | | | | | | | | | | | | | | | This implements SPJ's suggestion on the ticket (#14273). We find the relevant constraints (ones that whose free unification variables are all mentioned in the type of the hole), and then clone the free unification variables of the hole and the relevant constraints. We then add a subsumption constraints and run the simplifier, and then check whether all the constraints were solved. Reviewers: bgamari Reviewed By: bgamari Subscribers: RyanGlScott, rwbarton, thomie, carter GHC Trac Issues: #14273 Differential Revision: https://phabricator.haskell.org/D4315
* Fix references to cminusminus.orgBen Gamari2018-01-183-6/+6
| | | | | | | | | | | | Reviewers: simonmar Reviewed By: simonmar Subscribers: rwbarton, thomie, carter GHC Trac Issues: #14665 Differential Revision: https://phabricator.haskell.org/D4311
* Typos in commentsGabor Greif2018-01-1712-14/+14
|