| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This started when I noticed that `getCPUTime` only provides 1
millisecond resolution on Linux. Unfortunately the previous
implementation was quite unmaintainable, so this ended up being a bit
more involved than I expected.
Here we do several things,
* Split up `System.CPUTime`
* Add support for `clock_gettime`, allowing for significantly more
precise timing information when available
* Fix System.CPUTime resolution for Windows. While it's hard to get
reliable numbers, the consensus is that Windows only provides 16
millisecond resolution in GetProcessTimes (see Python PEP 0418 [1])
* Eliminate terrible hack wherein we would cast between `CTime` and
`Integer` through `Double`
[1] https://www.python.org/dev/peps/pep-0418/#id59
Test Plan: Validate on various platforms
Reviewers: austin, hvr, erikd
Reviewed By: erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2001
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2013
GHC Trac Issues: #11580
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Desugaring long lists with build trades large static data for large
code, which is likely a poor trade-off. See #11707.
Test Plan: Validate, nofib
Reviewers: simonpj, austin
Reviewed By: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2007
GHC Trac Issues: #11707
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The heap census now handles large ARR_WORDS objects which have
been shrunk by shrinkMutableByteArray# or resizeMutableByteArray#.
Test Plan: ./validate && make test WAY=profasm
Reviewers: hvr, bgamari, austin, thomie
Reviewed By: thomie
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2005
GHC Trac Issues: #11627
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Look at DWARF output.
Reviewers: scpmw, austin
Reviewed By: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1734
|
|
|
|
| |
For #9646.
|
| |
|
|
|
|
|
|
| |
This reverts commit 89bdac7635e6ed08927d760aa885d3e7ef3edb81 as
this test is duplicated with dependent/should_fail/T11473, added by
aade111248dce0834ed83dc4f18c234967b3202.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously they were merely specialised at Int and Integer. It seems to
me that these are cheap enough to be worth inlining. See #11701 for
motivation.
Test Plan: Validate
Reviewers: austin, hvr, simonpj
Reviewed By: simonpj
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1997
GHC Trac Issues: #11701
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Validate with testcase in D2002
Reviewers: austin, simonpj
Reviewed By: simonpj
Subscribers: simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D2004
GHC Trac Issues: #11702
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Test that it passes git HEAD and fails with GHC 7.8.
Reviewers: bgamari, hvr, austin, goldfire, thomie
Differential Revision: https://phabricator.haskell.org/D2009
GHC Trac Issues: #9646
|
|
|
|
| |
Test case: typecheck/should_compile/T11512
|
|
|
|
|
|
|
|
|
|
|
| |
There were several smallish bugs here:
- We had too small an InScopeSet when rejigging GADT return types.
- When adding the extra_tvs with a datatype kind signature, we
were sometimes changing Uniques of an explicitly bound kind var.
- Using coercionKind in the flattener got the wrong visibility
for a binder. Now we just zonk to get what we need.
Test case: dependent/should_compile/RaeJobTalk
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Fixes T11708
Reviewers: austin, bgamari, goldfire, simonpj
Reviewed By: goldfire, simonpj
Subscribers: simonpj, goldfire, thomie
Differential Revision: https://phabricator.haskell.org/D2006
GHC Trac Issues: #11708
|
|
|
|
|
|
|
|
| |
There were two bugs here, both simple: we need to filter out
covars before calling isMetaTyVar in the solver, and TcPat had
a tcSubType the wrong way round.
test case: dependent/should_compile/T11711
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using Clang as the C compiler, over 100 tests were failing
due to Clang reporting that some command line arguments were not
being used. These warnings only occur when Clang is compiling
assembler files which happens in two places, one of which already
conditionally adding `-Qunused-arguments` to the command line when
the compiler was Clang. This fixes the other.
Test Plan: validate with clang as the C compiler
Reviewers: bgamari, hvr, austin, rwbarton
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1998
GHC Trac Issues: #11684
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out that there were some pretty egregious mistakes
in the code that suggested -fprint-explicit-kinds, which are
fixed. This commit also reorders a bunch of error messages,
which I think is an improvement.
This also adds the test case for #11471, which is what
triggered the cleanup in TcErrors. Now that #11473 is done,
there is nothing more outstanding for #11471.
test case: dependent/should_fail/T11471
|
|
|
|
|
|
|
| |
This is as reported in #11471, though it's not the focus of that
ticket.
test case: polykinds/KindVType
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I've added a check in the zonker for representation polymorphism.
I don't like having this be in the zonker, but I don't know where
else to put it. It can't go in TcValidity, because a clever enough
user could convince the solver to do bogus representation polymorphism
even though there's nothing obviously wrong in what they wrote.
Note that TcValidity doesn't run over *expressions*, which is where
this problem arises.
In any case, the check is simple and it works.
test case: dependent/should_fail/T11473
|
|
|
|
|
|
|
|
|
| |
We were looking at a data instance tycon for visibility info,
which is the wrong place to look. Look at the data family tycon
instead.
Also improved the pretty-printing near there to suppress kind
arguments when appropriate.
|
| |
|
|
|
|
|
| |
This was necessary in an earlier version of the patch for #11648,
but not in the final version. I forgot to remove it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, checkTauTvUpdate, used in the eager unifier (TcUnify)
right before writing to a metavar, refused to write a metavar to
a type involving type functions. The reason for this was given
in a Note, but the Note didn't make all that much sense and even
admitted that it was a bit confused. The Note, in turn, referred
to another Note, which it was quite sceptical of, as well.
The type-family check was slowing down performance, so I tried
removing it, running the tests referred to in the Note. The tests
all passed without the check. Looking at more test results, I
saw several error messages improve without the check, and some cases
where GHC looped (T7788, in particular) it now doesn't.
So, all in all, quite a win: Two hairy Notes removed, several lines
of code removed, better performance, and improved output.
[skip ci]
|
|
|
|
|
|
|
|
|
|
|
|
| |
We now check that a CUSK is really a CUSK and issue an error if
it isn't. This also involves more solving and zonking in
kcHsTyVarBndrs, which was the outright bug reported in #11648.
Test cases: polykinds/T11648{,b}
This updates the haddock submodule.
[skip ci]
|
|
|
|
| |
[skip ci]
|
|
|
|
| |
[skip ci]
|
|
|
|
|
|
| |
This adapts the text from D1944.
[skip ci]
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This replaces the old HsType and HsTypeOut constructors
with HsAppType and HsAppTypeOut, leading to some simplification.
(This refactoring addresses #11329.)
This also fixes #11456, which stumbled over HsType (which is
not an expression).
test case: ghci/scripts/T11456
[skip ci]
|
|
|
|
|
|
| |
This commit teaches shortCutReduction about Derived constraints.
[skip ci]
|
|
|
|
|
|
|
|
|
| |
Now we fail when trying to default non-*-kinded kind variables
with -XNoPolyKinds.
test case: dependent/should_fail/T11334
[skip ci]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the `defer_me` check that was in checkTauTvUpdate
and uses only a type family check instead. The old defer_me check
repeated work done by fast_check in occurCheckExpand.
There is also some error message improvement, necessitated by
the terrible error message that the test case produced, even when
it didn't consume all of memory.
test case: dependent/should_fail/T11407
[skip ci]
|
|
|
|
| |
[skip ci]
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Validate
Reviewers: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2002
GHC Trac Issues: #11702
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1999
|
|
|
|
|
| |
This makes it a bit easier to find the description corresponding to
particular flags.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 673efccb3b uncovered a bug in LLVM code generation that produced
LLVM code that the LLVM compiler refused to compile:
{
clpH:
br label %clpH
}
This may well be a bug in LLVM itself. The solution is to keep the
existing entry label and rewrite the function as:
{
clpH:
br label %nPV
nPV:
br label %nPV
}
Thanks to Ben Gamari for pointing me in the right direction on this
one.
Test Plan: Build GHC with BuildFlavour=quick-llvm
Reviewers: hvr, austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1996
GHC Trac Issues: #11649
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1991
GHC Trac Issues: #9887
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
makeTrivial is responsible for concocting names during simplification.
Previously, however, it would make no attempt to generate a name that
might be useful to later readers of the resulting Core. Here we add a
bit of state to SimplEnv: a finite depth stack of binders within which
we are currently simplifying. We then derive generated binders from this
context.
See #11676.
Open questions:
* Is there a better way to accomplish this?
* Is `maxContextDepth` too large/small?
Test Plan: Validate, look at Core.
Reviewers: austin, simonpj
Reviewed By: simonpj
Subscribers: thomie, simonpj
Differential Revision: https://phabricator.haskell.org/D1970
GHC Trac Issues: #11676
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
stg_stack_underflow_frame had an incorrect
call of C function 'threadStackUnderflow':
("ptr" ret_off) =
foreign "C" threadStackUnderflow(
MyCapability(),
CurrentTSO);
Which means it's prototype is:
void * (*) (W_, void*);
While real prototype is:
W_ (*) (Capability *cap, StgTSO *tso);
The fix is simple. Fix type annotations:
(ret_off) =
foreign "C" threadStackUnderflow(
MyCapability() "ptr",
CurrentTSO "ptr");
Noticed when debugged T9045 test failure
on m68k target which distincts between
pointer and non pointer return types
(uses different registers)
While at it noticed and fixed return types
for 'throwTo' and 'findSpark'.
Trac #11395
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The algorithm for ApplicativeDo rearrangement is based on a heuristic
that runs in O(n^2). This patch adds the optimal algorithm, which is
O(n^3), selected by a flag (-foptimal-applicative-do). It finds better
solutions in a small number of cases (about 2% of the cases where
ApplicativeDo makes a difference), but it can be very slow for large do
expressions. I'm mainly adding it for experimental reasons.
ToDo: user guide docs
Test Plan: validate
Reviewers: simonpj, bgamari, austin, niteria, erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1969
|
|
|
|
|
|
|
| |
This occassionally fails with allocations a few tenths of a percent
above threshold. Sadly there isn't a clear cause; it's likely just the
result of gradual creep, further underscoring the need for more regular
performance characterization.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan:
* Validate
* try `env -i ghc`
* try `env -i runghc HelloWorld.hs`
Reviewers: austin
Subscribers: thomie, ezyang
Differential Revision: https://phabricator.haskell.org/D1971
GHC Trac Issues: #11678
|
|
|
|
|
|
|
|
| |
Reviewers: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1987
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: erikd, austin
Reviewed By: erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1994
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Ubuntu libc's `read` function is marked with attribute
`warn_unused_result` which was causing build failures on
Harbourmaster.
Test Plan: validate on Harbourmaster
Reviewers: austin, hvr, bgamari
Reviewed By: hvr, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1993
GHC Trac Issues: #11697
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bgamari, hvr, austin
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1989
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1988
|