summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add a ghc -show-packages mode to display ghc's view of the package envDuncan Coutts2014-08-293-27/+57
| | | | | | | | | You can use ghc -show-packages, in addition to any -package -package-conf -hide-package, etc flags and see just what ghc's package info looks like. The format is much like ghc-pkg show. Like the existing verbose tracing, but a specific mode. Re-introduce pretty printed package info (Cabal handled this previously).
* Remove a TODO that is now doneDuncan Coutts2014-08-291-4/+0
|
* Fix long lines and trailing whitespaceDuncan Coutts2014-08-296-57/+82
| | | | in the previous patches in this series
* Fix warnings arising from the package db refactoringDuncan Coutts2014-08-292-10/+6
|
* Make binary a boot packageDuncan Coutts2014-08-291-1/+1
| | | | Since ghc-pkg needs a relatively recent version.
* Drop ghc library dep on CabalDuncan Coutts2014-08-291-1/+0
|
* Move Cabal Binary instances from bin-package-db to ghc-pkg itselfDuncan Coutts2014-08-293-178/+152
| | | | | The ghc-pkg program of course still depends on Cabal, it's just the bin-package-db library (shared between ghc and ghc-pkg) that does not.
* Use ghc-local types for packages, rather than Cabal typesDuncan Coutts2014-08-296-120/+360
| | | | | | | | Also start using the new package db file format properly, by using the ghc-specific section. This is the main patch in the series for removing the compiler's dep on the Cabal lib.
* Introduce new file format for the package database binary cacheDuncan Coutts2014-08-295-44/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of the new format is to make it possible for the compiler to not depend on the Cabal library. The new cache file format contains more or less the same information duplicated in two different sections using different representations. One section is basically the same as what the package db contains now, a list of packages using the types defined in the Cabal library. This section is read back by ghc-pkg, and used for things like ghc-pkg dump which have to produce output using the Cabal InstalledPackageInfo text representation. The other section is a ghc-local type which contains a subset of the information from the Cabal InstalledPackageInfo -- just the bits that the compiler cares about. The trick is that the compiler can read this second section without needing to know the representation (or types) of the first part. The ghc-pkg tool knows about both representations and writes both. This patch introduces the new cache file format but does not yet use it properly. More patches to follow. (As of this patch, the compiler reads the part intended for ghc-pkg so it still depends on Cabal and the ghc-local package type is not yet fully defined.)
* Improve the ghc-pkg warnings for missing and out of date package cache filesDuncan Coutts2014-08-291-23/+38
| | | | | | In particular, report when it's missing, and also report it for ghc-pkg check. Also make the warning message more explicit, that ghc will not be able to read these dbs, even though ghc-pkg may be able to.
* Drop support for single-file style package databasesDuncan Coutts2014-08-292-69/+16
| | | | | | | | | | | | | | | | Historically the package db format was a single text file in Read/Show format containing [InstalledPackageInfo]. For several years now the default format has been a directory with one file per package, plus a binary cache. The old format cannot be supported under the new scheme where the compiler will not depend on the Cabal library (because it will not have access to the InstalledPackageInfo type) so we must drop support. It would still technically be possible to support a single text file style db (but containing a different type), but there does not seem to be any compelling reason to do so. (Part of preparitory work for removing the compiler's dep on Cabal)
* Simplify conversion in binary serialisation of ghc-pkg dbDuncan Coutts2014-08-292-4/+9
| | | | | | | We can serialise directly, without having to convert some fields to string first. (Part of preparitory work for removing the compiler's dep on Cabal)
* Testsuite wibblesSimon Peyton Jones2014-08-291-1/+6
|
* Improve "specImport discarding" messageSimon Peyton Jones2014-08-291-1/+2
|
* In GHC.Real, specialise 'even' and 'odd' to Int and IntegerSimon Peyton Jones2014-08-291-0/+4
| | | | | | | | | | This was previously happening by a fluke -- they were called with those types in GHC.Real itself -- but my recent changes to specialisation mean that auto specialisations like these are not necessarily exported. Losing those specialisations made a huge difference to two performance tests perf/should_run/MethSharing perf/should_run/T9339
* Rename red-black test in indexed-types to red-black-deleteSimon Peyton Jones2014-08-292-1/+1
|
* Define mapUnionVarSet, and use itSimon Peyton Jones2014-08-2912-36/+39
| | | | Call sites are much easier to understand than before
* Better compiler performance (30% less allocation) for T783!Simon Peyton Jones2014-08-291-1/+3
|
* White space onlySimon Peyton Jones2014-08-291-0/+1
|
* Fix syntax in perf/compiler/all.TSimon Peyton Jones2014-08-291-1/+0
|
* Improve trimming of auto-rulesSimon Peyton Jones2014-08-292-121/+151
| | | | | | | | | | | | | | I hadn't got the new function trimAutoRules quite right, so we had a left-over rule which mentioned a local variable whose binding had been discarded. (Result: crash when compiling Haddock.) This patch merges trimAutoRules into an expanded version of findExternalRules, gets it right, and adds lots of comments. See Note [Finding external rules]. And indeed in one regression test we get to trim off more rules (and hence code) than before.
* PprC: cleanup: don't emit 'FB_' / 'FE_' in via-CSergei Trofimovich2014-08-292-9/+0
| | | | | | | No need to emit (now empty) those special markers. Markers were needed only in registerised -fvia-C mode. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* [ci skip] Update .gitignoreAustin Seipp2014-08-281-0/+1
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* [ci skip] ghc-prim: Update .gitignoreAustin Seipp2014-08-281-0/+1
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Temporary fix to the crashSimon Peyton Jones2014-08-281-2/+2
| | | | | | | | ghc-stage2: panic! (the 'impossible' happened) (GHC version 7.9.20140828 for x86_64-unknown-linux): nameModule $w$smiddle_sfx6 make[1]: *** [utils/haddock/dist/build/Haddock/Backends/Xhtml.dyn_o] Error 1
* Comments onlySimon Peyton Jones2014-08-281-5/+13
|
* Add an interesting type-family/GADT example of deletion for red-black treesSimon Peyton Jones2014-08-282-0/+328
| | | | Due to Stephanie Weirich, Dan Licata, John Hughes, Matt Might
* testsuite: disable 'rdynamic' for 'ghci' waySergei Trofimovich2014-08-281-1/+5
| | | | | | | '-rdynamic' is currently only a link-time option. Does not make sense for ghci without major changes. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* testsuite: disable T367_letnoescape on 'optllvm'Sergei Trofimovich2014-08-281-1/+1
| | | | | | Known Issue #7297 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* Testsuite wibblesSimon Peyton Jones2014-08-282-5/+4
|
* White space onlySimon Peyton Jones2014-08-281-22/+22
|
* Remove dead lookup_dfun_id (merge-o)Simon Peyton Jones2014-08-281-6/+0
|
* Simple refactor of the case-of-case transformSimon Peyton Jones2014-08-281-17/+11
| | | | More modular, less code. No change in behaviour.
* Performance changesSimon Peyton Jones2014-08-281-0/+6
| | | | | | | | * T1969 improves, perhaps because of better specialiation * T5642 (a bizarre case) worsens, because we get lots and lots of specialisations of imported functions for the lots and lots of data types T5642 declares
* Testsuite wibblesSimon Peyton Jones2014-08-283-2/+25
|
* Run float-inwards immediately before the strictness analyser.Simon Peyton Jones2014-08-281-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | Doing so pushes bindings nearer their use site and hence makes them more likely to be strict. These bindings might only show up after the inlining from simplification. Example in fulsom, Csg.calc, where an arg of timesDouble thereby becomes strict. Very few programs are affected, but it's basically good news. Program Size Allocs Runtime Elapsed TotalMem -------------------------------------------------------------------------------- fft -0.2% +1.3% 0.06 0.06 -10.0% fulsom -0.0% -2.6% -4.3% -4.7% -6.7% simple +0.0% -0.8% 0.0% 0.0% 0.0% -------------------------------------------------------------------------------- Min -0.5% -2.6% -4.5% -4.7% -10.0% Max +0.1% +1.3% +3.3% +3.4% +2.6% Geometric Mean -0.0% -0.0% -0.6% -0.6% -0.2% The lossage in fft is the loss of detecting a common sub-expression, and can be fixed by doing earlier CSE. But that is in any case a bit of a fluke so I don't mind losing it in exchange for this more reliable gain.
* Comments onlySimon Peyton Jones2014-08-283-10/+34
|
* Make tidyProgram discard speculative specialisation rulesSimon Peyton Jones2014-08-283-6/+77
| | | | | | | The new function TidyPgm.trimAutoRules discards bindings and rules that were useful, but now have served their purpose. See Note [Trimming auto rules] in TidyPgm
* Fix an egregious bug in the NonRec case of bindFreeVarsSimon Peyton Jones2014-08-281-1/+1
| | | | | | We were missing the free variables of rules etc. It's correct for Rec but wrong for NonRec. I'm not sure how this bug hasn't bitten us before, but it cropped up when I was doing trimAutoRules.
* Add -fspecialise-aggressivelySimon Peyton Jones2014-08-283-43/+121
| | | | | | | | | | This flag specialises any imported overloaded function that has an unfolding, whether or not it was marked INLINEABLE. We get a lot of orphan SPEC rules as a result, but that doesn't matter provided we don't treat orphan auto-generated rules as causing the module itself to be an orphan module. See Note [Orphans and auto-generated rules] in MkIface.
* Compiler performance increases -- yay!Simon Peyton Jones2014-08-281-8/+8
|
* More SPEC rules fireSimon Peyton Jones2014-08-282-4/+6
|
* Wibbles to "...plus N others" error message about instances in scopeSimon Peyton Jones2014-08-289-28/+20
| | | | I this this arises from my de-orphaning the Enum Word instance
* Specialise monad functions, and make them INLINEABLESimon Peyton Jones2014-08-281-0/+38
| | | | | Specialise liftM, foldM, etc, and make them specialisable for new monads at their call sites by using INLINEABLE
* Slightly improve fusion rules for 'take'Simon Peyton Jones2014-08-281-3/+10
|
* Don't float out (classop dict e1 e2)Simon Peyton Jones2014-08-283-17/+30
| | | | | | | | | | | A class op applied to a dictionary doesn't do much work, so it's not a great idea to float it out (except possibly to the top level. See Note [Floating over-saturated applications] in SetLevels I also renamed "floatOutPartialApplications" to "floatOutOverSatApps"; the former is deeply confusing, since there is no partial application involved -- quite the reverse, it is *over* saturated.
* Move the Enum Word instance into GHC.EnumSimon Peyton Jones2014-08-282-24/+36
| | | | | This just avoids an unnecessary orphan instance. All the other instances for "earlier" types are in GHC.Enum already.
* Specialise Eq, Ord, Read, Show at Int, Char, StringSimon Peyton Jones2014-08-283-1/+11
| | | | | These instances are quite common, so it's good to have pre-specialised versions available
* Make worker/wrapper work on INLINEABLE thingsSimon Peyton Jones2014-08-283-47/+119
| | | | | | | | | | | | | | | | This fixes a long-standing bug: Trac #6056. The trouble was that INLINEABLE "used up" the unfolding for the Id, so it couldn't be worker/wrapper'd by the strictness analyser. This patch allows the w/w to go ahead, and makes the *worker* INLINEABLE instead, so it can later be specialised. However, that doesn't completely solve the problem, because the dictionary argument (which the specialiser treats specially) may be strict and hence unpacked by w/w, so now the worker won't be specilialised after all. Solution: never unpack dictionary arguments, which is done by the isClassTyCon test in WwLib.deepSplitProductType_maybe
* Make maybeUnfoldingTemplate respond to DFunUnfoldingsSimon Peyton Jones2014-08-281-2/+9
| | | | | | CoreSyn.maybeUnfoldingTemplate is used mainly when specialising, so make DFunUnfoldings respond to it makes it possible to specialise them properly.