summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix NUMA support on Windows (#15049)David Kraeutmann2018-05-032-9/+17
| | | | | | | | | | | | | | | | | | | | * osNumaNodes now returns the right number of nodes * thread affinity is now correctly set TODO: no noticeable performance improvement. does windows already distribute threads in a NUMA-aware fashion? Test Plan: * validate * local tests on a NUMA machine Reviewers: bgamari, erikd, simonmar Reviewed By: bgamari, simonmar Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D4607
* CircleCI: Save test results as JUnit XMLMatthew Pickering2018-05-031-1/+13
| | | | | | | | | | | | Reviewers: mrkkrp, bgamari Reviewed By: mrkkrp, bgamari Subscribers: thomie, carter GHC Trac Issues: #15093 Differential Revision: https://phabricator.haskell.org/D4646
* Don't shadow "result" in JUnit driverMatthew Pickering2018-05-031-2/+2
| | | | | | | | | | | | Reviewers: bgamari Reviewed By: bgamari Subscribers: thomie, carter GHC Trac Issues: #15093 Differential Revision: https://phabricator.haskell.org/D4645
* minor improvement to wording of warning against First. Add warning against LastAndrew Martin2018-05-031-1/+11
|
* document the plan for removing Data.Semigroup.OptionAndrew Martin2018-05-031-1/+6
|
* Warn against using Data.Monoid.FirstAndrew Martin2018-05-031-0/+10
| | | | Noting that it will be removed in the future.
* Compute DW_FORM_block length correctly; also fixes #15068Bertram Felgenhauer2018-05-031-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch, the pprUnwindwExpr function computed the length of by the following assembly fragment: .uleb128 1f-.-1 <expression data> 1: That is, to compute the length, it takes the difference of the label 1 and the address of the .uleb128 directive, and subtracts 1. In #15068 it was reported that `as` from binutils 4.30 has trouble with evaluating the `.` part of the expression. However, there is actually a problem with the expression, if the length of the data ever becomes larger than 128: In that case, the .uleb128 directive will emit more than 1 byte, and the computed length will be wrong. The present patch changes the assembly fragment to use two labels, which fixes both these problems. .uleb128 2f-1f 1: <expression data> 2: Test Plan: validate Reviewers: bgamari, osa1 Reviewed By: bgamari Subscribers: thomie, carter GHC Trac Issues: #15068 Differential Revision: https://phabricator.haskell.org/D4654
* Add regression tests for #14904Ryan Scott2018-05-035-0/+34
| | | | | | Trac #14904 was fixed in commit faec8d358985e5d0bf363bd96f23fe76c9e281f7. Let's add some tests to ensure that it stays fixed.
* Test Trac #15114Simon Peyton Jones2018-05-033-0/+25
|
* Set arity for absentErrorDavid Feuer2018-05-021-20/+23
| | | | | | | | | | | | | | | | | | * The note on how to prevent stable unfoldings from leading to `case` on `absentError` was wrong. Make it reflect reality. * Reviewing the above change, Simon noticed that we didn't set an arity for `absentError`, which definitely has arity 1. It may not matter much, since `absentError` usually vanishes quickly, but we might as well set it properly, so now we do. Reviewers: simonpj, bgamari Reviewed By: simonpj Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D4655
* storageAddCapabilities: fix bug in updating nursery pointersSimon Marlow2018-05-023-2/+24
| | | | | | | | | | | | | | | Summary: We were unconditionally updating the nursery pointers to be `nurseries[cap->no]`, but when using nursery chunks this might be wrong. This manifested as a later assertion failure in allocate(). Test Plan: new test case Reviewers: bgamari, niteria, erikd Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D4649
* errorWithoutStackTrace: omit profiling stack trace (#14970)Simon Marlow2018-05-021-5/+4
| | | | | | | | | | Test Plan: validate Reviewers: hvr, bgamari, erikd Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D4648
* Exitify: Do not trip over shadowing (fixes #15110)Joachim Breitner2018-05-011-4/+19
|
* rts: Allow profiling by closure type in prof wayBen Gamari2018-05-012-6/+5
| | | | | | | | | | | Previously we inexplicably disabled support for `-hT` profiling in the profiled way. Admittedly, there are relatively few cases where one would prefer -hT to `-hd`, but the option should nevertheless be available for the sake of consistency. Note that this does mean that there is a bit of an inconsistency in the behavior of `-h`: in the profiled way `-h` behaves like `-hc` whereas in the non-profiled way it defaults to `-hT`.
* rts: Add -hT to the rts usage messageBen Gamari2018-05-011-0/+3
| | | | | | | | | | Reviewers: erikd, simonmar Subscribers: thomie, carter GHC Trac Issues: #15086 Differential Revision: https://phabricator.haskell.org/D4643
* testsuite: Bump performance meterics due to 3d38e8284b73Ben Gamari2018-05-011-3/+6
| | | | | This commit bumped T12425, T12234 and T12150 over their expected metrics on OS X.
* rts: Don't disable formatting warning in RetainerSet.cBen Gamari2018-05-011-1/+0
| | | | This really shouldn't be necessary.
* Preserve join-point arity in CoreOptSimon Peyton Jones2018-05-012-3/+22
| | | | | | | | Trac #15108 showed that the simple optimiser in CoreOpt was accidentally eta-reducing a join point, so it didn't meet its arity invariant. This patch fixes it. See Note [Preserve join-binding arity].
* Don't crash when pretty-printing bad joinsSimon Peyton Jones2018-05-011-1/+9
| | | | | | | | | | Trac #15108 showed that the Core pretty-printer would crash if it found a join-point binding with too few lambda on the RHS. That is super-unhelpful! Lint will find it, but pretty-printing should not crash. This patch just makes the pretty printer behave more robustly; it leaves the job of error reporting to Lint.
* Add test case for #15108Joachim Breitner2018-04-302-0/+23
| | | | thanks to cdisselkoen for the nicely minimized test case.
* Better linting for typesSimon Peyton Jones2018-04-272-74/+99
| | | | | | | | | | Trac #15057 described deficiencies in the linting for types involving type synonyms. This patch fixes an earlier attempt. The moving parts are desrcribed in Note [Linting type synonym applications] Not a big deal.
* Make out-of-scope errors more prominentSimon Peyton Jones2018-04-274-15/+21
| | | | | | | | | | | | | | | | | | | | | | Generally, when the type checker reports an error, more serious ones suppress less serious ones. A "variable out of scope" error is arguably the most serious of all, so this patch moves it to the front of the list instead of the end. This patch also fixes Trac #14149, which had -fdefer-out-of-scope-variables, but also had a solid type error. As things stood, the type error was not reported at all, and compilation "succeeded" with error code 0. Yikes. Note that - "Hole errors" (including out of scope) are never suppressed. (maybeReportHoleError vs maybeReportError in TcErorrs) They can just get drowned by the noise. - But with the new orientation, out of scope errors will suppress type errors. That would be easy to change.
* Refactor tcExtendLocalFamInst a bitSimon Peyton Jones2018-04-272-30/+47
| | | | | | | This patch just pulls out FamInst.loadDependentFamInstModules as a separate function, and adds better comments. Provoked by Trac #14759, comment:10.
* Comments only: the FVAnn invariantSimon Peyton Jones2018-04-271-6/+19
|
* Minor refactoring in ExitifySimon Peyton Jones2018-04-271-32/+39
| | | | | | No change in behaviour here, just some modest refactoring as I tried to understand the code better.
* Add missing stdout file for T14955Simon Peyton Jones2018-04-271-1/+1
| | | | Accidentally omitted from Trac #14955 commit.
* TTG : complete for balance of hsSyn ASTAlan Zimmerman2018-04-2768-1960/+3138
| | | | | | | | | | | | | | | | | | Summary: - remove PostRn/PostTc fields - remove the HsVect In/Out distinction for Type, Class and Instance - remove PlaceHolder in favour of NoExt - Simplify OutputableX constraint Updates haddock submodule Test Plan: ./validate Reviewers: goldfire, bgamari Subscribers: goldfire, thomie, mpickering, carter Differential Revision: https://phabricator.haskell.org/D4625
* Rename a local variableSimon Peyton Jones2018-04-271-2/+2
|
* Refactor in OccurAnalSimon Peyton Jones2018-04-271-28/+29
| | | | | | | | | * (+++) --> andUDs * combineAltsUsageDetails --> orUDs * combineUsageDetailsList --> andUDsList * Change some andUDsList to a fold for efficiency No change in behaviour
* Comments onlySimon Peyton Jones2018-04-272-2/+3
|
* Do not unpack class dictionaries with INLINABLESimon Peyton Jones2018-04-2610-32/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Matthew Pickering uncovered a bad performance hole in the way that single-method dictionaries work, described in Trac #14955. See Note [Do not unpack class dictionaries] in WwLib. I tried to fix this 6 years ago, but got it slightly wrong. This patch fixes it, which makes a dramatic improvement in the test case. Nofib highlights: not much happening: Program Size Allocs Runtime Elapsed TotalMem ----------------------------------------------------------------- VSM -0.3% +2.7% -7.4% -7.4% 0.0% cacheprof -0.0% +0.1% +0.3% +0.7% 0.0% integer -0.0% +1.1% +7.5% +7.5% 0.0% tak -0.1% -0.2% 0.024 0.024 0.0% ----------------------------------------------------------------- Min -4.4% -0.2% -7.4% -7.4% -8.0% Max +0.6% +2.7% +7.5% +7.5% 0.0% Geom Mean -0.1% +0.0% +0.1% +0.1% -0.2% I investigated VSM. The patch unpacks class dictionaries a bit more than before (i.e. does so if there is no INLINABLE pragma). And that gives better code in VSM (less dictionary selection etc), but one closure gets one word bigger. I'll accept these changes in exchange for more robust performance. Some ghci.debugger output wobbled around (order of bindings being displayed). I have no idea why; but I accepted the changes.
* Update Hadrian submoduleAndrey Mokhov2018-04-261-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Link to Quick Start guide * Update README.md (hadrian/578) * Fix AppVeyor (hadrian/577) * Fix CircleCI * Generic library rules (hadrian/571) * Fix lint error (hadrian/575) * Fix missing libHSghc-8.5-0.a (hadrian/574) * Fix the path to touchy (hadrian/572) * Fix integer-gmp build (hadrian/568) * Undo fs*.h workaround * Fix copying of fs*.h files during RTS registration (hadrian/566) * Fix Windows build, improve error reporting (hadrian/565) * Fix Windows build (hadrian/563) * Fix boot and configure on AppVeyor (hadrian/561) * Preliminary bindist (hadrian/558, hadrian/555) * Unregister stage0 package first if it needs to be cloned (hadrian/552) * Fix Circle CI (hadrian/553) * Fix warnings (hadrian/547) * Merge pull request hadrian/542 from Mistuke/fix-specific-file * Use Cabal directly in place of ghc-cabal + make build root configurable (hadrian/531) * Add user-defined flavour example for turning off dynamic linking (hadrian/535) * Add clean routines for fs (hadrian/533) * Add 'git' to nativeBuildInputs in shell.nix (hadrian/530) * Add extra include paths when invoking ghc-cabal (hadrian/526) * Merge pull request hadrian/528 from snowleopard/bump-cabal * Merge pull request hadrian/521 from snowleopard/drop-chmod * Change permission bits for build.cabal.sh, fixes hadrian/517 (hadrian/520) * Pin nixpkgs and all-cabal-hashes in shell.nix (hadrian/511) * Add troubleshooting section
* Stable.c: minor refactoring, add/update some commentsÖmer Sinan Ağacan2018-04-252-33/+32
| | | | | | | | | | | | Test Plan: Passes validate Reviewers: simonmar, bgamari, erikd Subscribers: thomie, carter GHC Trac Issues: #10296 Differential Revision: https://phabricator.haskell.org/D4627
* testsuite: Fix T4442 on 32-bit architecturesBen Gamari2018-04-241-1/+28
| | | | | | | | | | | | This relied on Int# being 64-bits. This is nothing a bit of CPP can't fix, but I think the right solution would be to make out treatment of word-size dependent types more consistent, as suggested by #11953. Test Plan: Validate on i386 Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D4614
* testsuite: Fix overflow in T13623 on 32-bit machinesBen Gamari2018-04-242-2/+5
| | | | | | | | | | | | | We simply truncate the result to 32-bits to ensure that the test passed under both environments. Test Plan: Validate on 32-bit Subscribers: thomie, carter GHC Trac Issues: #13623 Differential Revision: https://phabricator.haskell.org/D4615
* ghc-prim: Refactor and document __sync_fetch_and_nand workaroundBen Gamari2018-04-241-15/+60
| | | | | | | | | | | | | | | | ed6f9fb9d5a684d2159c29633159c3254cf04deb reduced the scope of this hack to only include Clangs which actually lack __sync_fetch_and_nand. However, this causes GHC to fail to build with -Werror on Clang due to the lack of the -Wsync-nand warning flag. As it turns out a flag controlling the warning is available under a different name, however. Test Plan: Validate with Clang, GCC Subscribers: thomie, carter GHC Trac Issues: #9678 Differential Revision: https://phabricator.haskell.org/D4613
* Add testcase for #15050Joachim Breitner2018-04-232-0/+22
| | | | so that we notice if someone accidentially implements this...
* coercion: Improve debugging outputSimon Peyton Jones2018-04-231-36/+46
| | | | | | | | | | | * Improve assertion-failure message * Add HasDebugCallStack to decomposeFunCo Reviewers: goldfire, bgamari Subscribers: thomie, carter Differential Revision: https://phabricator.haskell.org/D4570
* users-guide: Fix up formatting in 8.6 release notesBen Gamari2018-04-231-7/+7
|
* Typo fix in scavenge_one comment [skip ci]Ömer Sinan Ağacan2018-04-221-1/+1
|
* Remove a outdated comment [skip ci]Ömer Sinan Ağacan2018-04-211-3/+0
|
* rts: Use g0 for &generations[0]Ömer Sinan Ağacan2018-04-211-3/+2
| | | | [skip ci]
* s/traverse_weak_ptr_list/traverseWeakPtrList in comments [skip ci]Ömer Sinan Ağacan2018-04-211-5/+5
|
* Remove unnecessary check in simplCastTobias Dammers2018-04-202-8/+16
| | | | | | | | | | | | | The coercion optimizer will take care of it anyway, and the check is prohibitively expensive. See Trac #14737. Reviewers: bgamari Subscribers: simonpj, thomie, carter Differential Revision: https://phabricator.haskell.org/D4568
* base: Add a test for T10412Ben Gamari2018-04-203-0/+11
| | | | | | | | | | | | | Expects the current behavior, will be updated by D4593 to reflect desired behavior. Reviewers: hvr Subscribers: thomie, carter GHC Trac Issues: #10412 Differential Revision: https://phabricator.haskell.org/D4610
* Fix implementation of rnIfaceBndrMatthew Pickering2018-04-201-1/+1
| | | | | | | | | | | | Reviewers: ezyang, bgamari Reviewed By: bgamari Subscribers: thomie, carter GHC Trac Issues: #15041 Differential Revision: https://phabricator.haskell.org/D4600
* Remove broken top-level shell.nixMatthew Pickering2018-04-201-61/+0
| | | | | | | | | | | | | | | There is a maintained shell.nix file in the hadrian submodule. This has long since been broken anyway. Reviewers: bgamari Reviewed By: bgamari Subscribers: thomie, carter GHC Trac Issues: #15045 Differential Revision: https://phabricator.haskell.org/D4599
* comments onlySimon Peyton Jones2018-04-201-4/+4
|
* Inline wrappers earlierSimon Peyton Jones2018-04-2013-265/+323
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch has a single significant change: strictness wrapper functions are inlined earlier, in phase 2 rather than phase 0. As shown by Trac #15056, this gives a better chance for RULEs to fire. Before this change, a function that would have inlined early without strictness analyss was instead inlining late. Result: applying "optimisation" made the program worse. This does not make too much difference in nofib, but I've stumbled over the problem more than once, so even a "no-change" result would be quite acceptable. Here are the headlines: -------------------------------------------------------------------------------- Program Size Allocs Runtime Elapsed TotalMem -------------------------------------------------------------------------------- cacheprof -0.5% -0.5% +2.5% +2.5% 0.0% fulsom -1.0% +2.6% -0.1% -0.1% 0.0% mate -0.6% +2.4% -0.9% -0.9% 0.0% veritas -0.7% -23.2% 0.002 0.002 0.0% -------------------------------------------------------------------------------- Min -1.4% -23.2% -12.5% -15.3% 0.0% Max +0.6% +2.6% +4.4% +4.3% +19.0% Geometric Mean -0.7% -0.2% -1.4% -1.7% +0.2% * A worthwhile reduction in binary size. * Runtimes are not to be trusted much but look as if they are moving the right way. * A really big win in veritas, described in comment:1 of Trac #15056; more fusion rules fired. * I investigated the losses in 'mate' and 'fulsom'; see #15056.
* Caching coercion roles in NthCo and coercionKindsRole refactoringTobias Dammers2018-04-2028-343/+4358
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While addressing nonlinear behavior related to coercion roles, particularly `NthCo`, we noticed that coercion roles are recalculated often even though they should be readily at hand already in most cases. This patch adds a `Role` to the `NthCo` constructor so that we can cache them rather than having to recalculate them on the fly. https://ghc.haskell.org/trac/ghc/ticket/11735#comment:23 explains the approach. Performance improvement over GHC HEAD, when compiling Grammar.hs (see below): GHC 8.2.1: ``` ghc Grammar.hs 176.27s user 0.23s system 99% cpu 2:56.81 total ``` before patch (but with other optimizations applied): ``` ghc Grammar.hs -fforce-recomp 175.77s user 0.19s system 100% cpu 2:55.78 total ``` after: ``` ../../ghc/inplace/bin/ghc-stage2 Grammar.hs 10.32s user 0.17s system 98% cpu 10.678 total ``` Introduces the following regressions: - perf/compiler/parsing001 (possibly false positive) - perf/compiler/T9872 - perf/compiler/haddock.base Reviewers: goldfire, bgamari, simonpj Reviewed By: simonpj Subscribers: rwbarton, thomie, carter GHC Trac Issues: #11735 Differential Revision: https://phabricator.haskell.org/D4394