| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Currently the line information for bare source C-- is rather spartan. These add
notes for assignments, which tend to be useful to identify. Unfortunately, we
had to settle for approximate source locations as none of the parsers in
CmmParse return located things. However, I don't think it's worth changing this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In commit 53c78be0aab76a3107c4dacbb1d177afacdd37fa object code is
generated for modules depended on by modules that use -XTemplateHaskell.
This turns the same logic on for modules that use -XQuasiQuotes.
A test is added.
Note that I've based this of D3646, as it has a function I want to use.
Test Plan: ./validate
Reviewers: austin, bgamari, alexbiehl
Reviewed By: alexbiehl
Subscribers: alexbiehl, rwbarton, thomie
GHC Trac Issues: #13863
Differential Revision: https://phabricator.haskell.org/D3677
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, we we only using `tcSplitSigmaTy` when determining if a
function had been applied to too few arguments, so it wouldn't work for
functions with nested `forall`s. Thankfully, this is easily fixed with a
dash of `tcSplitNestedSigmaTys`.
Test Plan: make test TEST=T13311
Reviewers: austin, bgamari, simonpj
Reviewed By: bgamari
Subscribers: goldfire, simonpj, rwbarton, thomie
GHC Trac Issues: #13311
Differential Revision: https://phabricator.haskell.org/D3678
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Added a test which was previously failing
Reviewers: austin, bgamari, simonpj
Reviewed By: simonpj
Subscribers: simonpj, rwbarton, thomie
GHC Trac Issues: #13914
Differential Revision: https://phabricator.haskell.org/D3698
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
haddock-2.18 supports user defined pattern synonym signatures so this
seems like a welcomed addition.
Reviewers: austin, bgamari, mpickering
Reviewed By: bgamari, mpickering
Subscribers: rwbarton, thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D3699
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Simplify naming scheme of tcInstBinder(s)X
Test Plan: Eyeball and compile
Reviewers: austin, goldfire, bgamari
Subscribers: goldfire, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3690
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan:
* New unit tests
* validate
Reviewers: dfeuer, simonpj, niteria, bgamari, austin, erikd
Reviewed By: dfeuer
Subscribers: rwbarton, thomie
GHC Trac Issues: #13875
Differential Revision: https://phabricator.haskell.org/D3681
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the missing branch for parsing the optional 'instance' keyword
in associated type family instance declarations.
Fixes #13747
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: simonpj, RyanGlScott, rwbarton, thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D3673
|
|
|
|
| |
[ci skip]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit d6cecde585b0980ed8e0050c5a1d315789fb6356.
The patch broke Simon PJ's Windows build, becuase he didn't
have (and should not need) a separate msys2 gcc.
Following an exchange on the ghc-devs list, Tamar wrote
Oops, sorry, didn’t notice it because both mine and harbormaster’s
msys2 have separate GCCs installed as well.
I don’t see an easy fix that would also work for end user Configure
based cabal installs. So I think I’ll have to go back to the drawing
board for this one.
You can just leave it reverted.
|
|
|
|
|
|
|
|
|
|
| |
Trac #13881 showed that our handling of lexically scoped type
variables was way off when we bring into scope a name 'y' for
a pre-existing type variable 'a', perhaps with an entirely
different name.
This patch fixes it; see TcHsType
Note [Pattern signature binders]
|
| |
|
|
|
|
|
|
|
|
|
| |
This fails in stage 2 when bootstrapping HEAD with HEAD
due to -Werror.
Turns out that tcInstBinders is now dead, and I'll remove it if nobody
protests. I'd like to hear opinions whether
tcInstBindersX then should be renamed to tcInstBinders.
|
| |
|
| |
|
|
|
|
| |
This patch fixes the buglet described in Trac #13890.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trac #13879 showed that when we were trying to solve
(forall z1 (y1::z1). ty1) ~ (forall z2 (y2:z2). ty2)
we'd end up spitting out z1~z2 with no binding site for them.
Those kind equalities need to be inside the implication.
I ended up re-factoring the code for solving forall-equalities.
It's quite nice now.
|
|
|
|
|
|
|
| |
Trac #13879 showed that there was a missing zonk in tcLHsKind.
I also renamed it to tcLHsKindSig, for consistency with type signatures
There's a commment to explain why the zonk is needed.
|
|
|
|
| |
See Trac #13879
|
|
|
|
|
|
| |
I had not intended on merging this.
This reverts commit b0708588e87554899c2efc80a2d3eba353dbe926.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When loading/reloading with a large number of modules
(>5000) the cost of linear lookups becomes significant.
The changes here made `:reload` go from 6s to 1s on my
test case.
The bottlenecks were `needsLinker` in `DriverPipeline` and
`getModLoop` in `GhcMake`.
Test Plan: ./validate
Reviewers: simonmar, austin, bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3646
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is another attempt at resolving #13594 by treating strict variable
binds as FunBinds instead of PatBinds (as suggested in comment:1).
Test Plan: Validate
Reviewers: austin, alanz
Subscribers: rwbarton, thomie, mpickering
GHC Trac Issues: #13594
Differential Revision: https://phabricator.haskell.org/D3670
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was previously a panic and caused #13871. I believe just saying
these types simply aren't Typeable should be correct.
Test Plan: Validate, check `T13871`
Reviewers: goldfire, austin
Subscribers: rwbarton, thomie, RyanGlScott
GHC Trac Issues: #13871
Differential Revision: https://phabricator.haskell.org/D3672
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: austin, hvr, erikd, simonmar
Reviewed By: simonmar
Subscribers: rwbarton, thomie
GHC Trac Issues: #8281, #13730.
Differential Revision: https://phabricator.haskell.org/D3619
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The binutils documentation states that .short is a synonym for .word,
which I assumed to mean "machine word", leading me to believe that we
needed to use .hword to render half-machine-words. However, Darwin's
toolchain doesn't understand .hword, so there we instead used .short.
However, as it turns out the binutils documentation confusingly uses
"word" to refer to a 16-bit word, so .short should work fine. Moreover,
LLVM's internal assembler also doesn't understand .hword, so using
.short consistently simplies things remarkably.
Test Plan: Validate using binutils and LLVM internal assembler,
validate on Darwin
Reviewers: niteria, austin
Reviewed By: niteria
Subscribers: rwbarton, thomie
GHC Trac Issues: #13866
Differential Revision: https://phabricator.haskell.org/D3667
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This copies the subset of Hoopl's functionality needed by GHC to
`cmm/Hoopl` and removes the dependency on the Hoopl package.
The main motivation for this change is the confusing/noisy interface
between GHC and Hoopl:
- Hoopl has `Label` which is GHC's `BlockId` but different than
GHC's `CLabel`
- Hoopl has `Unique` which is different than GHC's `Unique`
- Hoopl has `Unique{Map,Set}` which are different than GHC's
`Uniq{FM,Set}`
- GHC has its own specialized copy of `Dataflow`, so `cmm/Hoopl` is
needed just to filter the exposed functions (filter out some of the
Hoopl's and add the GHC ones)
With this change, we'll be able to simplify this significantly.
It'll also be much easier to do invasive changes (Hoopl is a public
package on Hackage with users that depend on the current behavior)
This should introduce no changes in functionality - it merely
copies the relevant code.
Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com>
Test Plan: ./validate
Reviewers: austin, bgamari, simonmar
Reviewed By: bgamari, simonmar
Subscribers: simonpj, kavon, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3616
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The naughty record selector check means to limit selectors which would
lead to existential tyvars escaping their scope. With record pattern
synonyms, there are situations where universal tyvars don't appear in
the result type, for example:
```
pattern ReadP :: Read a => a -> String
pattern ReadP{readp} <- (read -> readp)
```
This is a similar issue to #11224 where we assumed that we can decide
which variables are universal and which are existential by the syntactic
check of seeing which appear in the result type. The fix is to use
`univ_tvs` from `conLikeFullSig` rather than the previous approximation.
But we must also remember to apply `EqSpec`s so we use the free
variables from `inst_tys` which is precisely `univ_tvs` with `EqSpecs`
applied.
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3649
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using Template Haskell, one can construct lambda expressions with no
arguments. The pretty-printer isn't aware of this fact, however. This
changes that.
Test Plan: make test TEST=T13856
Reviewers: bgamari, austin, goldfire
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #13856
Differential Revision: https://phabricator.haskell.org/D3664
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: austin, bgamari, goldfire
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #13782
Differential Revision: https://phabricator.haskell.org/D3641
|
| |
|
|
|
|
| |
See Trac #13827.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
s/tyVarsOfType/tyCoFVsOfType/g
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: validate
Reviewers: bgamari, niteria, austin, erikd
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3640
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
This reverts commit 667abf17dced8b4a4cd2dc6a291a6f244ffa031f.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes a bad bug in the specialiser, which showed up as
Trac #13429. When specialising an imported DFun, the specialiser could
generate a recusive loop where none existed in the original program.
It's all rather tricky, and I've documented it at some length in
Note [Avoiding loops]
We'd encoutered exactly this before (Trac #3591) but I had failed
to realise that the very same thing could happen for /imported/
DFuns.
I did quite a bit of refactoring.
The compiler seems to get a tiny bit faster on
deriving/perf/T10858
but almost all the gain had occurred before now; this
patch just pushed it over the line.
|