summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* testsuite: Fix cabal01 testBen Gamari2017-06-231-2/+2
| | | | | | | | | | | | | The other-modules field listed things that weren't in fact modules, causing this test to fail. See Cabal #4567. Test Plan: Validate Reviewers: hvr, austin Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3665
* compiler: Eliminate pprTrace in SPT entry addition codepathBen Gamari2017-06-231-2/+1
| | | | | | | | | | | | | Test Plan: Load program with StaticPointers into GHCi, ensure no tracing output makes it in. Reviewers: austin Subscribers: rwbarton, thomie, RyanGlScott GHC Trac Issues: #12356 Differential Revision: https://phabricator.haskell.org/D3663
* UNREG: use __builtin___clear_cache where availableSergei Trofimovich2017-06-221-0/+16
| | | | | | | | | | | | | | | | | Noticed when was building UNREG ghc with -optc{-Wall,-Werror}: rts/sm/Storage.c:1359:3: error: error: implicit declaration of function '__clear_cache' [-Werror=implicit-function-declaration] __clear_cache((void*)begin, (void*)end); ^~~~~~~~~~~~~ | 1359 | __clear_cache((void*)begin, (void*)end); | ^ Left direct '__clear_cache' usage gcc toolchain before 4.4. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Fix typo5outh2017-06-221-1/+1
|
* Revert "rts: Suppress unused gcc_clear_cache warning"Ben Gamari2017-06-211-2/+0
| | | | This reverts commit d1d3e98443cf263ef09253e2478e3e638e174e0d.
* rts: Suppress unused gcc_clear_cache warningBen Gamari2017-06-211-0/+2
|
* Revert "UNREG: use __builtin___clear_cache where available"Sergei Trofimovich2017-06-211-21/+1
| | | | | | | | | This reverts commit 6dd1257fdd4d18e84d32e89bf0ec664b3c8f7b93. Change fails vaildation: rts/sm/Storage.c:1351:20: error: error: ‘gcc_clear_cache’ defined but not used [-Werror=unused-function] STATIC_INLINE void gcc_clear_cache(void * begin, void * end)
* change filtering of variables in extract_hs_tv_bndrs (fixes #13782)Carlos Tomé2017-06-213-79/+43
| | | | | | | | | | | | Reviewers: austin, bgamari, goldfire Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13782 Differential Revision: https://phabricator.haskell.org/D3641
* Show only the number of modules in ghciFrancesco Mazzoli2017-06-215-27/+18
| | | | | | | | | | Reviewers: bgamari, austin, simonmar Reviewed By: bgamari Subscribers: mpickering, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3651
* base: Export Fingerprint accessors from Type.Reflection.UnsafeBen Gamari2017-06-211-2/+2
| | | | | | | | | | Reviewers: dfeuer, austin, hvr Reviewed By: dfeuer Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3660
* UNREG: use __builtin___clear_cache where availableSergei Trofimovich2017-06-211-1/+21
| | | | | | | | | | | | | | | Noticed when was building UNREG ghc with -optc{-Wall,-Werror}: rts/sm/Storage.c:1359:3: error: error: implicit declaration of function '__clear_cache' [-Werror=implicit-function-declaration] __clear_cache((void*)begin, (void*)end); ^~~~~~~~~~~~~ | 1359 | __clear_cache((void*)begin, (void*)end); | ^ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Fix note reference [ci skip]Gabor Greif2017-06-201-1/+1
|
* Improve comments on AbsBindsSimon Peyton Jones2017-06-191-36/+55
| | | | See Trac #13827.
* Add missing -Wdeprecations flag to the users guideerdeszt2017-06-192-0/+20
|
* Reword documentation region overlap documentation for copying mutable arraysAndrew Martin2017-06-191-6/+14
|
* cmm/CmmLayoutStack: avoid generating unnecessary reloadsMichal Terepeta2017-06-193-38/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This tries to be more precise when generating reloads of local registers in proc points. Previously we'd reload all local registers that were live. But we used liveness information that assumed local registers survive native calls. For the purpose of reloading registers this is an overapproximation and might lead to generating huge amounts of unnecessary reloads (in case there's another proc point before the register is used). This change takes the approach of moving the generation of reloads to a second pass over the Cmm, which allows to recompute the liveness and can use the knowledge that local registers do *not* survive calls. This leads to generating only useful reloads. For an extreme example where this helps a lot please see T3294. This should also fix #7198 Finally, this re-introduces the code to do Cmm rewriting using in `Dataflow` module (with the difference that we know operate on a whole block at a time). Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com> Reviewers: austin, bgamari, simonmar Reviewed By: simonmar Subscribers: kavon, rwbarton, thomie GHC Trac Issues: #7198 Differential Revision: https://phabricator.haskell.org/D3586
* configure: Look for objdump on OpenBSD and AIXBen Gamari2017-06-191-2/+3
| | | | | | | | | | | | | | | | | deriveConstants requires objdump for both of these operating systems, in addition to Windows. See #13812. Test Plan: Validate on OpenBSD and AIX Reviewers: hvr, austin Reviewed By: hvr Subscribers: rwbarton, thomie, erikd GHC Trac Issues: #13812 Differential Revision: https://phabricator.haskell.org/D3638
* Add test cases for #13821Douglas Wilson2017-06-194-0/+18
| | | | | | | | | | | | Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13821 Differential Revision: https://phabricator.haskell.org/D3642
* Don't expose fingerprints from Type.ReflectionDavid Feuer2017-06-191-3/+0
| | | | | | | | | | | | | | | | The `Fingerprint` type is not exported from any "public" module. It therefore seems quite strange that `Type.Reflection` exports functions for extracting fingerprints. Remove those exports. If fingerprints are eventually considered public, this can be reconsidered. Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3643
* Fix GCC 7 warning in the RTSSylvain Henry2017-06-191-0/+4
| | | | | | | | | | | | Test Plan: validate Reviewers: austin, bgamari, erikd, simonmar Reviewed By: bgamari, simonmar Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3648
* Add T9630David Feuer2017-06-193-0/+132
| | | | | | | | | | | | | | | This is not the most precise test, unfortunately, but it does demonstrate a modest improvement in compiler residency as a result of the specializer don't-loop patch. A rather less realistic variation on this has somewhat more dramatic effects. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3656
* Add fixity declaration for :~~:Ryan Scott2017-06-191-1/+1
| | | | | | | | | | | | | We have one for `(:~:)`, but not for `(:~~:)`! Let's fix this oversight. Reviewers: bgamari, austin, hvr Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3657
* testsuite: Add testcase for #13822Ben Gamari2017-06-192-0/+68
| | | | | | | | | | Reviewers: austin Subscribers: rwbarton, thomie GHC Trac Issues: #13822 Differential Revision: https://phabricator.haskell.org/D3655
* rts: A bit of cleanup around the eventlogBen Gamari2017-06-191-67/+30
|
* rts: Ensure that new capability count is > 0Ben Gamari2017-06-181-1/+7
| | | | | The Haskell wrapper already checks this but we should also check it in the RTS to catch non-Haskell callers. See #13832.
* Typofix in Data.Type.Equality commentsRyan Scott2017-06-181-1/+1
|
* Look through type synonyms in existential contexts when deriving FunctorRyan Scott2017-06-183-2/+30
| | | | | | | | | | | | | | | | | | | | Summary: This amounts to using `exactTyCoVarsOfType` instead of `tyCoVarsOfType` in the right place. I also fixed a similar issue for `-XDatatypeContexts` while I was in town (but couldn't be bothered to add a test for it). Test Plan: make test TEST=T13813 Reviewers: austin, bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, thomie GHC Trac Issues: #13813 Differential Revision: https://phabricator.haskell.org/D3635
* Fix out-of-date comments in TyCoRepRyan Scott2017-06-181-3/+3
| | | | s/tyVarsOfType/tyCoFVsOfType/g
* Remove the Windows GCC driver.Tamar Christina2017-06-175-88/+30
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch drops the GCC driver and instead moves the only remaining path that we need to keep for backwards compatibility to the settings file. It also generalizes the code that expands `$TopDir` so it can expand it within any location in the string and also changes it so `$TopDir` is expanded only after the words call because `$TopDir` can contains spaces which would be horribly broken. Test Plan: ./validate Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, erikd GHC Trac Issues: #13709 Differential Revision: https://phabricator.haskell.org/D3592
* Provide way to build using existing C compiler on Windows.Tamar Christina2017-06-173-10/+65
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: There are various distros that build GHC using their own C compilers such as MSYS2. Currently they have to patch the build scripts everytime. This patch provides the configure argument `--enable-distro-toolchain` which allows one to build using any C compiler on the path. This is also useful for testing new versions of GCC. Test Plan: ./configure --enable-distro-toolchain && make - && make THREADS=9 test ./validate Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie, erikd, #ghc_windows_task_force GHC Trac Issues: #13792 Differential Revision: https://phabricator.haskell.org/D3637
* Fix the treatment of 'closed' definitionsSimon Peyton Jones2017-06-167-178/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | The IdBindingInfo field of ATcId serves two purposes - to control generalisation when we have -XMonoLocalBinds - to check for floatability when dealing with (static e) These are related, but not the same, and they'd becomme confused. Trac #13804 showed this up via an example like this: f periph = let sr :: forall a. [a] -> [a] sr = if periph then reverse else id sr2 = sr -- The question: is sr2 generalised? -- It should be, because sr has a type sig -- even though it has periph free in (sr2 [True], sr2 "c") Here sr2 should be generalised, despite the free var 'periph' in 'sr' because 'sr' has a closed type signature. I documented all this very carefully this time, in TcRnTypes: Note [Meaning of IdBindingInfo] Note [Bindings with closed types: ClosedTypeId]
* base: Validate input in setNumCapabilitiesBen Gamari2017-06-164-2/+9
| | | | | | | | | | | | Test Plan: validate Reviewers: austin, hvr, erikd, simonmar Subscribers: rwbarton, thomie GHC Trac Issues: #13832 Differential Revision: https://phabricator.haskell.org/D3652
* Add mapMG to allow making ModuleGraph abstractBartosz Nitka2017-06-142-3/+7
| | | | | | | | | | | | | | | | | | | | | Currently GHC exposes the internal details of `ModuleGraph` which inhibits making `ModuleGraph` support faster lookups. Haddock relies on the internal representation by using `map` on `ModuleGraph`. See also https://github.com/haskell/haddock/issues/635 Adding `mapMG` should allow us to make `ModuleGraph` abstract. Test Plan: ./validate Reviewers: simonmar, austin, bgamari, alexbiehl Reviewed By: bgamari, alexbiehl Subscribers: alexbiehl, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3645
* Fix Haddock markupGabor Greif2017-06-141-1/+1
|
* Typos [ci skip]Gabor Greif2017-06-135-5/+5
|
* Make -w less aggressive (Trac #12056)Sean Gillespie2017-06-1214-42/+107
| | | | | | | | | | | | | | | Previously -w combined with -Wunrecognised-warning-flags would not report unrecognized flags. Reviewers: austin, bgamari, dfeuer Reviewed By: bgamari Subscribers: dfeuer, rwbarton, thomie GHC Trac Issues: #12056 Differential Revision: https://phabricator.haskell.org/D3581
* Stop forcing everything in coreBindsSizeDavid Feuer2017-06-121-18/+12
| | | | | | | | | | | | | | | | | | | | `coreBindsSize` forced a ton of structure to stop space leaks. Reid Barton has done some work recently to try to stop the leaks at their source instead. Memory residency remains well below the numbers Herbert posted on #13426 originally, but in some cases a ways above the ones from 8.0. I need to figure out how to get the numbers matched up to individual modules and do some profiling. Relates to #13426 Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3606
* Support signatures at the kind level in Template HaskellRyan Scott2017-06-124-13/+43
| | | | | | | | | | | | | | | | | `repNonArrowKind` was missing a case for `HsKindSig`, which this commit adds. Fixes #13781. Test Plan: make test TEST=T13781 Reviewers: goldfire, austin, bgamari Reviewed By: goldfire Subscribers: rwbarton, thomie GHC Trac Issues: #13781 Differential Revision: https://phabricator.haskell.org/D3627
* Add perf test for #12545Ryan Scott2017-06-123-0/+118
| | | | | | | | | | | | | | | | | | Commit 2b74bd9d8b4c6b20f3e8d9ada12e7db645cc3c19 did wonders for the program reported in #12545. Let's add a perf test for it to make sure it stays fast. Test Plan: make test TEST=T12545 Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #12545 Differential Revision: https://phabricator.haskell.org/D3632
* Fix #13807 - foreign import nondeterminismBartosz Nitka2017-06-125-8/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that the generated label included a freshly assigned Unique value. Test Plan: Added a new test and looked at the generated stub: ``` #include "HsFFI.h" #ifdef __cplusplus extern "C" { #endif extern HsInt zdmainzdAzdAzuzzlzzgzzg(StgStablePtr the_stableptr); extern HsInt zdmainzdAzdAzumkStringWriter(StgStablePtr the_stableptr); #ifdef __cplusplus } #endif ``` ./validate Reviewers: simonmar, austin, bgamari Reviewed By: simonmar Subscribers: rwbarton, thomie GHC Trac Issues: #13807 Differential Revision: https://phabricator.haskell.org/D3633
* Improve getNameToInstancesIndexDouglas Wilson2017-06-122-8/+18
| | | | | | | | | | | | | | Put it in a GhcMonad. Stop accidentally reversing the list of instances. Add a comment noting the code is mostly copied from tcRnGetInfo. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: mpickering, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3636
* users-guide: Document multi-line DEPRECATED pragmasBen Gamari2017-06-121-0/+6
| | | | | | | | | | | | | | | | Fixes #13791. [skip ci] Test Plan: Read it Reviewers: austin Subscribers: rwbarton, thomie GHC Trac Issues: #13791 Differential Revision: https://phabricator.haskell.org/D3639
* Fix a bug in -foptimal-applicative-doSimon Marlow2017-06-123-1/+13
| | | | | | | | | | | | Test Plan: validate Reviewers: bgamari, niteria, austin, erikd Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3640
* linker: Fix cast-to-uint64_tBen Gamari2017-06-121-1/+1
| | | | This broke on 32-bit platforms.
* Correct optimization flags documentationSantiago Munin2017-06-081-5/+3
| | | | | | | | | | | | | | | | | | | | | In a previous change (commit 4fd6207ec6960c429e6a1bcbe0282f625010f52a), the users guide was moved from XML to the RST format. This process introduced a typo: "No -O*-type option specified:" was changed to "-O*" (which is not correct). This change fixes it. See result in: https://prnt.sc/fh332n Fixes ticket #13756. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13756 Differential Revision: https://phabricator.haskell.org/D3631
* Don't pass -dcore-lint to haddock in Haddock.mkDouglas Wilson2017-06-082-21/+26
| | | | | | | | | | | | | | | This fixes the regressions in the haddock performance tests introduced in c9eb4385aad248118650725b7b699bb97ee21c0d. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13789 Differential Revision: https://phabricator.haskell.org/D3629
* Add tcRnGetNameToInstancesIndexDouglas Wilson2017-06-082-0/+42
| | | | | | | | | | | | | | | | | | | This function in tcRnDriver, retrieves an index by name of all Class and Family instances in the current environment. This is to be used by haddock which currently looks up instances for each name, which looks at every instance for every lookup. Using this function instead of tcRnGetInfo, the haddock.base performance test improves by 10% Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: alexbiehl, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3624
* Refactor temp files cleanupDouglas Wilson2017-06-0818-305/+427
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove filesToNotIntermediateClean from DynFlags, create a data type FilesToClean, and change filesToClean in DynFlags to be a FilesToClean. Modify SysTools.newTempName and the Temporary constructor of PipelineMonad.PipelineOutput to take a TempFileLifetime, which specifies whether a temp file should live until the end of GhcMonad.withSession, or until the next time cleanIntermediateTempFiles is called. These changes allow the cleaning of intermediate files in GhcMake to be much more efficient. HscTypes.hptObjs is removed as it is no longer used. A new performance test T13701 is added, which passes both with and without -keep-tmp-files. The test fails by 25% without the patch, and passes when -keep-tmp-files is added. Note that there are still at two hotspots caused by algorithms quadratic in the number of modules, however neither of them allocate. They are: * DriverPipeline.compileOne'.needsLinker * GhcMake.getModLoop DriverPipeline.compileOne'.needsLinker is changed slightly to improve the situation. I don't like adding these Types to DynFlags, but they need to be seen by Dynflags, SysTools and PipelineMonad. The alternative seems to be to create a new module. Reviewers: austin, hvr, bgamari, dfeuer, niteria, simonmar, erikd Reviewed By: simonmar Subscribers: rwbarton, thomie GHC Trac Issues: #13701 Differential Revision: https://phabricator.haskell.org/D3620
* Check target libtoolMoritz Angermann2017-06-082-2/+13
| | | | | | | | | | | | | This will qualify the libtool with the target, e.g. arch-vendor-os-libtool, instead of simply using libtool. Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: Ericson2314, ryantrinkle, rwbarton, thomie, erikd Differential Revision: https://phabricator.haskell.org/D3617
* [linker] fix armv7 & add aarch64Moritz Angermann2017-06-0822-617/+1681
| | | | | | | | | | | | | | | This adds Global Offset Table logic, as well as PLT like logic for armv7 and aarch64; which replaces the preexisting symbolExtras logic, by placing the PLT tables next to the separtely loaded sections. This is needed to ensure that the symbol stubs are in range. Reviewers: bgamari, austin, erikd, simonmar Reviewed By: bgamari Subscribers: Ericson2314, ryantrinkle, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3448