| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Move dead assignment elimination to CmmLive
* Kill off dead code in CmmSpillReload related
to non-splitting procpoints case
* Refactor dual liveness transfer function to
more closely mimic CmmLive's liveness transfer.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
| |
| |
| |
| |
| | |
I'm not sure what's going on with these warnings, but for now
I've suppressed them all.
|
|/ |
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately, I couldn't remove all incidences of runCmmContFlowOpt
from HscMain; in particular, there is a Cmm conversion testing
facility which may run with only control flow optimizations, which
I preserved the semantics of. Given the state of the current
codegen, this code might be moribund anyway.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The "Unhelpful" cases are now in a separate type. This allows us to
improve various things, e.g.:
* Most of the panic's in SrcLoc are now gone
* The Lexer now works with RealSrcSpans rather than SrcSpans, i.e. it
knows that it has real locations and thus can assume that the line
number etc really exists
* Some of the more suspicious cases are no longer necessary, e.g.
we no longer need this case in advanceSrcLoc:
advanceSrcLoc loc _ = loc -- Better than nothing
More improvements can probably be made, e.g. tick locations can
probably use RealSrcSpans too.
|
|/
|
|
| |
...all to do with the new codgen path
|
|
|
|
| |
This exposes new constants that can be propagated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the mini-inliner would only forward substitute assignments
to registers that were used exactly once, to not risk duplicating
computation. For constants there's no such risk so we always
substitute. Prior to the change the Cmm
fn
{
bits64 a, b;
a = 1;
b = a + a;
RET_N(b);
}
would be optimized as
fn() { []
}
ca: _cb::I64 = 1;
R1 = _cb::I64 + _cb::I64;
jump (I64[Sp + 0]) ();
}
but after it would be optimized as
fn() { []
}
ca: R1 = 2;
jump (I64[Sp + 0]) ();
}
Note that this pass does not deal with the now dead assignment.
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|
|
|
|
|
|
| |
This assignment rewriting pass subsumes the previous reload
sinking pass, and also performs basic inlining.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|\ |
|
| | |
|
| |\ |
|
| | | |
|
|\ \ \
| |_|/
|/| | |
|
| |\ \
| | |/ |
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
compiler/typecheck/TcErrors.lhs
compiler/typecheck/TcSMonad.lhs
compiler/typecheck/TcType.lhs
compiler/types/TypeRep.lhs
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
See the paper "Practical aspects of evidence based compilation in System FC"
* Coercion becomes a data type, distinct from Type
* Coercions become value-level things, rather than type-level things,
(although the value is zero bits wide, like the State token)
A consequence is that a coerion abstraction increases the arity by 1
(just like a dictionary abstraction)
* There is a new constructor in CoreExpr, namely Coercion, to inject
coercions into terms
|
| |_|/
|/| |
| | |
| | | |
Not needed now that we don't support registerised via-C compilation.
|
| | |
| | |
| | |
| | | |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
| | |
| | |
| | |
| | |
| | |
| | | |
We now test
cGhcWithNativeCodeGen == "YES"
instead.
|
| | |
| | |
| | |
| | | |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
| |/
|/|
| |
| |
| | |
This is more pleasant than having the C generator check whether the
function it's calling is cas, and not generate a prototype if so.
|
| |
| |
| |
| | |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
| |
| |
| |
| |
| |
| |
| | |
This patch fixes silliness where the SP pointer is continually
bumped up and down.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
| |
| |
| |
| | |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes the following statements valid C--, which uses the
block ID directly rather than generating an anonymous block:
if (expr) goto foo;
switch expr {
case 0: goto foo;
case 1: goto bar;
}
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
| |
| |
| |
| |
| | |
I'm not sure if this is the best way to fix this, but it fixes the
unreg build.
|
| |
| |
| |
| | |
This reverts commit 2ec796239b782505cfb305af2789abcfa820baaf.
|
| |
| |
| |
| |
| |
| |
| | |
This assignment rewriting pass subsumes the previous reload
sinking pass, and also performs basic inlining.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
| |
| |
| |
| | |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
| |
| |
| |
| | |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
| |
| |
| |
| | |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|
|/
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
|