[commit: ghc] master: Source notes (CorePrep and Stg support) (4cdbf80)
git at git.haskell.org
git at git.haskell.org
Tue Dec 16 21:02:15 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/4cdbf80250da2d3ba1c63451e5fbc9b5ca9cbfe9/ghc
>---------------------------------------------------------------
commit 4cdbf80250da2d3ba1c63451e5fbc9b5ca9cbfe9
Author: Peter Wortmann <scpmw at leeds.ac.uk>
Date: Tue Jan 14 18:25:16 2014 +0000
Source notes (CorePrep and Stg support)
This is basically just about continuing maintaining source notes after
the Core stage. Unfortunately, this is more involved as it might seem,
as there are more restrictions on where ticks are allowed to show up.
Notes:
* We replace the StgTick / StgSCC constructors with a unified StgTick
that can carry any tickish.
* For handling constructor or lambda applications, we generally float
ticks out.
* Note that thanks to the NonLam placement, we know that source notes
can never appear on lambdas. This means that as long as we are
careful to always use mkTick, we will never violate CorePrep
invariants.
* This is however not automatically true for eta expansion, which
needs to somewhat awkwardly strip, then re-tick the expression in
question.
* Where CorePrep floats out lets, we make sure to wrap them in the
same spirit as FloatOut.
* Detecting selector thunks becomes a bit more involved, as we can run
into ticks at multiple points.
(From Phabricator D169)
>---------------------------------------------------------------
4cdbf80250da2d3ba1c63451e5fbc9b5ca9cbfe9
compiler/codeGen/StgCmmBind.hs | 39 ++++++-----
compiler/codeGen/StgCmmExpr.hs | 21 ++++--
compiler/coreSyn/CorePrep.hs | 95 ++++++++++++++++++++++----
compiler/profiling/SCCfinal.hs | 20 +++---
compiler/simplStg/StgStats.hs | 3 +-
compiler/simplStg/UnariseStg.hs | 6 +-
compiler/stgSyn/CoreToStg.hs | 145 +++++++++++++++++++---------------------
compiler/stgSyn/StgLint.hs | 4 +-
compiler/stgSyn/StgSyn.hs | 60 +++++++----------
9 files changed, 226 insertions(+), 167 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 4cdbf80250da2d3ba1c63451e5fbc9b5ca9cbfe9
More information about the ghc-commits
mailing list