[commit: ghc] master: Source notes (Core support) (993975d)
git at git.haskell.org
git at git.haskell.org
Tue Dec 16 21:02:06 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/993975d3a532887b38618eb604efe6502f3c66f8/ghc
>---------------------------------------------------------------
commit 993975d3a532887b38618eb604efe6502f3c66f8
Author: Peter Wortmann <scpmw at leeds.ac.uk>
Date: Mon Dec 1 20:21:47 2014 +0100
Source notes (Core support)
This patch introduces "SourceNote" tickishs that link Core to the
source code that generated it. The idea is to retain these source code
links throughout code transformations so we can eventually relate
object code all the way back to the original source (which we can,
say, encode as DWARF information to allow debugging). We generate
these SourceNotes like other tickshs in the desugaring phase. The
activating command line flag is "-g", consistent with the flag other
compilers use to decide DWARF generation.
Keeping ticks from getting into the way of Core transformations is
tricky, but doable. The changes in this patch produce identical Core
in all cases I tested -- which at this point is GHC, all libraries and
nofib. Also note that this pass creates *lots* of tick nodes, which we
reduce somewhat by removing duplicated and overlapping source
ticks. This will still cause significant Tick "clumps" - a possible
future optimization could be to make Tick carry a list of Tickishs
instead of one at a time.
(From Phabricator D169)
>---------------------------------------------------------------
993975d3a532887b38618eb604efe6502f3c66f8
compiler/basicTypes/SrcLoc.hs | 30 +++--
compiler/coreSyn/CoreArity.hs | 39 +++++-
compiler/coreSyn/CoreFVs.hs | 2 +-
compiler/coreSyn/CorePrep.hs | 31 +++--
compiler/coreSyn/CoreSubst.hs | 34 +++--
compiler/coreSyn/CoreSyn.hs | 269 +++++++++++++++++++++++++++++++++-----
compiler/coreSyn/CoreUnfold.hs | 9 +-
compiler/coreSyn/CoreUtils.hs | 266 +++++++++++++++++++++++++++----------
compiler/coreSyn/PprCore.hs | 10 +-
compiler/deSugar/Coverage.hs | 19 ++-
compiler/deSugar/Desugar.hs | 1 +
compiler/iface/IfaceSyn.hs | 21 +++
compiler/iface/MkIface.hs | 1 +
compiler/iface/TcIface.hs | 1 +
compiler/main/DynFlags.hs | 10 +-
compiler/main/HscMain.hs | 6 +-
compiler/simplCore/CSE.hs | 28 ++--
compiler/simplCore/FloatIn.hs | 17 +--
compiler/simplCore/FloatOut.hs | 14 +-
compiler/simplCore/OccurAnal.hs | 84 ++++++------
compiler/simplCore/SetLevels.hs | 2 +
compiler/simplCore/SimplCore.hs | 45 +++++--
compiler/simplCore/SimplEnv.hs | 20 ++-
compiler/simplCore/SimplUtils.hs | 54 +++++---
compiler/simplCore/Simplify.hs | 99 +++++++-------
compiler/specialise/Rules.hs | 61 ++++++---
compiler/specialise/SpecConstr.hs | 9 +-
compiler/stgSyn/CoreToStg.hs | 3 +
compiler/utils/OrdList.hs | 10 ++
29 files changed, 873 insertions(+), 322 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 993975d3a532887b38618eb604efe6502f3c66f8
More information about the ghc-commits
mailing list