a mirror of the official ghc repository
Fix Trac #4945: another SpecConstr infelicity
Well, more a plain bug really, which led to SpecConstr missing some obvious opportunities for specialisation.
Thanks to Max Bolingbroke for spotting this.
add missing initialisation of ws->todo_large_objects
Found-by: Valgrind. Thanks Julian!
Add -XNondecreasingIndentation to -XHaskell98 for backwards compatibility.
The final straw was when I learned today that Happy broke.
Fix typo in SpecConstr that made it not work at all
There was a terrible typo in this patch; I wrote "env" instead of "env1".
Mon Jan 31 11:35:29 GMT 2011 simonpj@microsoft.com * Improve Simplifier and SpecConstr behaviour
Anyway, this fix is essential to make it work properly. Thanks to Max for spotting the problem (again).
Now we keep any partially-full blocks in the gc_thread[] structs after each GC, rather than moving them to the generation. This should give us slightly better locality (though I wasn't able to measure any difference).
Also in this patch: better sanity checking with THREADED.
Store the number of the destination generation in the Bdescr struct, so that in evacuate() we don't have to deref gen to get it. This is another improvement ported over from my GC branch.
scheduleProcessInbox: use non-blocking acquire, and take the whole queue
This is an improvement from my GC branch, that helps performance for intensive message-passing communication between Capabilities.
Remove the per-generation mutable lists
Now that we use the per-capability mutable lists exclusively.
+RTS -qw hasn't done anything since 7.0.1; remove the implementation & docs
It is still (silently) accepted for backwards compatibility.
Annotate thread stop events with the owner of the black hole
So we can now get these in ThreadScope:
19487000: cap 1: stopping thread 6 (blocked on black hole owned by thread 4)
Note: needs an update to ghc-events. Older ThreadScopes will just ignore the new information.
Fix type checker error message
See Trac #4940. We had a message The lambda expression ` x -> x' has one argument one argument, repeating the "one argument" part. Easy fix.
Some refactoring of SpecConstr
This was originally to improve the case when SpecConstr generated a function with an unused argument (see Trac #4941), but I ended up giving up on that. But the refactoring is still an improvement.
In particular I got rid of BothOcc, which was unused.
Don't make join points when the case has only one non-bottom alternative
This fixes Trac #4930. See Note [Bottom alternatives] in Simplify.lhs
Improve Simplifier and SpecConstr behaviour
Trac #4908 identified a case where SpecConstr wasn't "seeing" a specialisation it should easily get. The solution was simple: see Note [Add scrutinee to ValueEnv too] in SpecConstr.
Then it turned out that there was an exactly analogous infelicity in the mighty Simplifer too; see Note [Add unfolding for scrutinee] in Simplify. This fix is good for Simplify even in the absence of the SpecConstr change. (It arose when I moved the binder- swap stuff to OccAnall, not realising that it remains valuable to record info about the scrutinee of a case expression. The Note says why.
Together these two changes are unconditionally good. Better simplification, better specialisation. Thank you Max.
count "dud" sparks (expressions that were already evaluated when sparked)