| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
We want to use the inplace ar, rather than whichever ar the
machine that we build on happens to have.
|
| |
|
|
|
|
| |
Now that they've moved from Control.Monad.Instances
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I'm experimenting with making GHC a bit more aggressive about
a) dropping case expressions if the result is unused
Simplify.rebuildCase, CaseElim equation
b) floating case expressions inwards
FloatIn.fiExpr, AnnCase
In both cases the new behaviour is gotten with a static (debug)
flag -faggressive-primops. The extra "aggression" is to allow
discarding and floating in for side-effecting operations. See
the new, extensive Note [PrimOp can_fail and has_side_effects]
in PrimoOp.
When discarding a case with unused binders, in the lifted-type
case it's definitely ok if the scrutinee terminates; previously
we were checking exprOkForSpeculation, which is significantly
worse.
So I wanted a new function CoreUtils.exprCertainlyTerminates.
In doing this I ended up with a significant refactoring in
CoreUtils. The new structure has quite a lot of nice sharing:
exprIsCheap = exprIsCheap' isHNFApp
exprIsExpandable = exprIsCheap' isConLikeApp
exprIsHNF = exprIsHNFlike isHNFApp
exprIsConLike = exprIsHNFlike isConLikeApp
exprCertainlyTerminates = exprIsHNFlike isTerminatingApp
|
|\ |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
is used for optimisation. (enabled by default)
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
| |
There was a trivial typo which meant that important
newly-added rules would never fire!
|
|\ |
|
| |\ |
|
| | | |
|
| |\ \
| | |/ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
TBAA allows us to specify a type hierachy in metadata with
the property that nodes on different branches don't alias.
This should somewhat improve the optimizations LLVM does that
rely on alias information.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
On XCode 4.1, we use /usr/bin/gcc-4.2 as it makes better code than
/usr/bin/gcc for us. However, gcc-4.2 doesn't exist in XCode 4.2, so we
need to use /usr/bin/gcc there. As the installer can be used on either,
we make it always use /usr/bin/gcc.
|
| | |
| | |
| | |
| | | |
It was removed in 4.2.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The libraries get configured during "make", so plain old "make clean"
should clean up the configure droppings.
Also fixed another wildcard/patsubst problem.
|
| | |
| | |
| | |
| | |
| | | |
We were applying $(wildcard ...) to the literal string
libraries/%/*.buildinfo, which of course had no matches.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch implements the idea of deferring (most) type errors to
runtime, instead emitting only a warning at compile time. The
basic idea is very simple:
* The on-the-fly unifier in TcUnify never fails; instead if it
gets stuck it emits a constraint.
* The constraint solver tries to solve the constraints (and is
entirely unchanged, hooray).
* The remaining, unsolved constraints (if any) are passed to
TcErrors.reportUnsolved. With -fdefer-type-errors, instead of
emitting an error message, TcErrors emits a warning, AND emits
a binding for the constraint witness, binding it
to (error "the error message"), via the new form of evidence
TcEvidence.EvDelayedError. So, when the program is run,
when (and only when) that witness is needed, the program will
crash with the exact same error message that would have been
given at compile time.
Simple really. But, needless to say, the exercise forced me
into some major refactoring.
* TcErrors is almost entirely rewritten
* EvVarX and WantedEvVar have gone away entirely
* ErrUtils is changed a bit:
* New Severity field in ErrMsg
* Renamed the type Message to MsgDoc (this change
touches a lot of files trivially)
* One minor change is that in the constraint solver we try
NOT to combine insoluble constraints, like Int~Bool, else
all such type errors get combined together and result in
only one error message!
* I moved some definitions from TcSMonad to TcRnTypes,
where they seem to belong more
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Two changes here
* The main change here is to enhance the FloatIn pass so that it can
float case-bindings inwards. In particular the case bindings for
array indexing.
* Also change the code in Simplify, to allow a case on array
indexing (ie can_fail is true) to be discarded altogether if its
results are unused.
Lots of new comments in PrimOp about can_fail and has_side_effects
Some refactoring to share the FloatBind data structure between
FloatIn and FloatOut
|
|\ \
| |/ |
|
| |\ |
|
| | |
| | |
| | |
| | | |
Patch from Karel Gardas!
|
| | | |
|
| | | |
|
| |/ |
|
|\ \
| |/ |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We now carry around with CmmJump statements a list of
the STG registers that are live at that jump site.
This is used by the LLVM backend so it can avoid
unnesecarily passing around dead registers, improving
perfromance. This gives us the framework to finally
fix trac #4308.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
I haven't been able to test whether this works or not due to #5754,
but at least it doesn't appear to break anything.
|