| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This tracks the amount of memory allocation by each thread in a
counter stored in the TSO. Optionally, when the counter drops below
zero (it counts down), the thread can be sent an asynchronous
exception: AllocationLimitExceeded. When this happens, given a small
additional limit so that it can handle the exception. See
documentation in GHC.Conc for more details.
Allocation limits are similar to timeouts, but
- timeouts use real time, not CPU time. Allocation limits do not
count anything while the thread is blocked or in foreign code.
- timeouts don't re-trigger if the thread catches the exception,
allocation limits do.
- timeouts can catch non-allocating loops, if you use
-fno-omit-yields. This doesn't work for allocation limits.
I couldn't measure any impact on benchmarks with these changes, even
for nofib/smp.
|
| |
|
|
|
|
|
| |
This commit also makes better names for several of these functions,
and removes one that went unused.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the result of an email conversation (off list) with
Conal Elliott, who needed a stronger unSubCo_maybe. This
commit adds cases to upgrade the role of a coercion when
recursion is necessary to do say (for example, for a use of
TransCo). As a side effect, more coercion optimizations are
now possible.
This was not done previously because unSubCo_maybe was used
only during coercion optimization, and the recursive cases
looked to be unlikely. However, adding them can cause no harm.
unSubCo_maybe is now also exported from Coercion, for use
cases like Conal's.
|
|
|
|
|
|
|
|
| |
We now display the foralls of a type if any of the type variables
is polykinded. This put kind polymorphism "in your face" a bit more
often, but eliminates a lot of head scratching.
The user manual reflects the new behaviour.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The reifyAnnotation method of the Q monad correctly gathered annotations
from TCG and EPS. Unfortunately it didn't look into the Home Package
Table. This resulted in annotations not being found if they are in the
same package as the splice that is reifying and ghc --make is used for
compilation management. Fix this by using the already existing
prepareAnnotations method from HscTypes.lhs that correctly searches
in HPT and EPS both.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The argument in Trac #9033 is very compelling: we should not report 20
errors, fix one, and have the other 19 disappear. They were spurious
in the first place.
The fix was easy; do type-class defaulting uncondionally, rather than
only if there are no insoluble constraints.
See Note [When to do type-class defaulting] in TcSimplify.
Error messages generally improve, especially tc211 which actually
had an example of precisely this phenomenon.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See Note [Do not eta-expand PAPs] in SimplUtils. This has a tremendously
good effect on compile times for some simple benchmarks.
The test is now where it belongs, in perf/compiler/T9020 (instead of simpl015).
I did a nofib run and got essentially zero change except for cacheprof which
gets 4% more allocation. I investigated. Turns out that we have
instance PP Reg where
pp ppm ST_0 = "%st"
pp ppm ST_1 = "%st(1)"
pp ppm ST_2 = "%st(2)"
pp ppm ST_3 = "%st(3)"
pp ppm ST_4 = "%st(4)"
pp ppm ST_5 = "%st(5)"
pp ppm ST_6 = "%st(6)"
pp ppm ST_7 = "%st(7)"
pp ppm r = "%" ++ map toLower (show r)
That (map toLower (show r) does a lot of map/toLowers. But if we inline show
we get something like
pp ppm ST_0 = "%st"
pp ppm ST_1 = "%st(1)"
pp ppm ST_2 = "%st(2)"
pp ppm ST_3 = "%st(3)"
pp ppm ST_4 = "%st(4)"
pp ppm ST_5 = "%st(5)"
pp ppm ST_6 = "%st(6)"
pp ppm ST_7 = "%st(7)"
pp ppm EAX = map toLower (show EAX)
pp ppm EBX = map toLower (show EBX)
...etc...
and all those map/toLower calls can now be floated to top level.
This gives a 4% decrease in allocation. But it depends on inlining
a pretty big 'show' function.
With this new patch we get slightly better eta-expansion, which makes
a function look slightly bigger, which just stops it being inlined.
The previous behaviour was luck, so I'm not going to worry about
losing it.
I've added some notes to nofib/Simon-nofib-notes
|
|
|
|
|
|
|
|
| |
Previously we always printed qualified names, but that makes a lot of debug or
warning output very verbose. So now we only print qualified names with -dppr-debug.
Civilised output (from pukka error messages, with the environment available) is
unaffected
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the following, now defunct flags, which will not be
recognized by GHC 7.10:
-fwarn-lazy-unlifted-bindings
-pgmm and -optm (used for the Mangler, long dead)
-keep-raw-s-file & -keep-raw-s-files
-monly[432]-reg-only
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
| |
This clean-up is in a similiar spirit as 574ef4293b8676.
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GHC previously introduced a space here. However, this can in some cases
be interpreted as "-U __PIC__" - note that in shell, the -U would still
be recognized with an argument, but the argument would be " __PIC__",
with a space in front, as opposed to the single string '__PIC__'.
In practice most tools seem to handle this OK. But the Coverity Scan
analysis tool does not: it errors on the fact that ' __PIC__' is an
invalid CPP name to undefine.
With this, it seems the Coverity analysis tool can easily analyze the
entire GHC build.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
| |
Now that we're in development mode, Applicative will soon be a
superclass of Monad in HEAD. So let's go ahead and deprecate the
-fno-warn-amp flag, remove the checks, and tweak a few tests
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update several old
http://hackage.haskell.org/trac/ghc
URLs references to the current
http://ghc.haskell.org/trac/ghc
URLs.
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
|
|
|
| |
This checks that all the required extensions are enabled for the
inferred type signature.
Updates binary and vector submodules.
|
|
|
|
|
|
| |
In the rather gnarly filterImports code, someone had forgotten
the AvailTC invariant: in AvailTC n [n,s1,s2], the 'n' is itself
included in the list of names.
|
|
|
|
|
|
| |
Fixes Trac #8987. See Note [Exceptions in TH]
Thanks to Yuras Shumovich for doing this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trac #8985 showed up a major shortcoming in the kind unifier: it was
ignoring untoucability. This has unpredictably-bad consequences;
notably, the skolem-escape check can fail.
There were two things wrong
* TcRnMonad.isTouchableTcM was returning a constant value for kind variables
(wrong), and even worse the constant was back-to-front (it was always False).
* We weren't even calling isTouchableTcM in TcType.unifyKindX.
I'm not sure how this ever worked.
Merge to 7.8.3 in due course.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In tidying up the flattener I introduced an error that no
regression test caught, giving rise to Trac #8978, #8979.
It shows up if you have a type synonym whose RHS mentions
type functions, such sas
type family F a
type T a = (F a, a) -- This synonym isn't properly flattened
The fix is easy, but sadly the bug is in the released GHC 7.8.1
|
|
|
|
|
|
|
|
|
|
|
| |
This change adds a suggestion
Possible fix: add a type signature for âfâ
when we have a GADT-style definition with a
type we can't figure out.
See Note [Suggest adding a type signature] in TcErrors.
This initially came up in the discussion of Trac #8968.
|
|
|
|
|
|
|
| |
I don't think there should be any change in behaviour, but
the code is clearer now. Function checkSize is elimiated
in favour of doing those checks before (rather than after)
splitFun/splitThunk.
|
|
|
|
|
|
|
|
|
|
| |
See Note [Demand analysis for trivial right-hand sides] in DmdAnal.
This allows a function with arity 2 to have a DmdSig with 3 args;
which in turn had a knock-on effect, which showed up in the test for
Trac #8963.
In fact it seems entirely reasonable, so this patch removes the
WARN and CoreLint checks that were complaining.
|
|
|
|
|
|
|
|
|
| |
One important reason is that gcc 4.8.1 sometimes crashes:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60436
Another reason is that preprocessing assembly files unnecessarily
slows down compilation.
|
| |
|
|
|
|
| |
This was just an omission, which showed up as Trac #8966
|
| |
|
|
|
|
|
|
|
|
|
| |
I got sucked into a significant refactoring of the way that
Typeable instances are derived. This makes it simpler and
more uniform.
I also improved the documentation in the user manual. Typeable
really is different to other classes, and now gets its own subsection.
|
| |
|
|
|
|
| |
(#8961)
|
|
|
|
|
| |
We now do role inference on stupid datatype contexts, allowing a
lightweight role annotation syntax.
|
|
|
|
|
|
|
|
|
|
| |
This bumps the amount of default reserved and committed stack for GHC
executables to 8mb, to work around #8870. A proper fix should happen in
7.8.2
See note [Windows stack usage] in SysTools for the details.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
| |
This reverts commit a79613a75c7da0d3d225850382f0f578a07113b5.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes Trac #8954.
There were actually three places where tuple occ-names
were parsed:
- IfaceEnv.lookupOrigNameCache
- Convert.isBuiltInOcc
- OccName.isTupleOcc_maybe
I combined all three into TysWiredIn.isBuiltInOcc_maybe
Much nicer.
|
|
|
|
|
|
| |
This addresses #8950. However, the problem isn't completely solved,
because the Prelude types' Typeable instances are not created by
AutoDeriveTypeable.
|
|
|
|
|
|
|
|
|
|
| |
This is just making the parser behave more sensibly, and return
the list [x,y,z] from the signature
x,y,z :: Int
rathe than [x,z,y] as now.
Turns out that the other use of sig_vars *did* do the right
thing already.
|
|
|
|
| |
A palpable bug, although one that will rarely bite
|
| |
|
|
|
|
|
| |
If the number of elements being copied is known statically this might
lead to the copy loop being unrolled in the backend.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These array types are smaller than Array# and MutableArray# and are
faster when the array size is small, as they don't have the overhead
of a card table. Having no card table reduces the closure size with 2
words in the typical small array case and leads to less work when
updating or GC:ing the array.
Reduces both the runtime and memory allocation by 8.8% on my insert
benchmark for the HashMap type in the unordered-containers package,
which makes use of lots of small arrays. With tuned GC settings
(i.e. `+RTS -A6M`) the runtime reduction is 15%.
Fixes #8923.
|