[commit: ghc] master: Debug data extraction (NCG support) (f46aa73)
git at git.haskell.org
git at git.haskell.org
Tue Dec 16 21:02:29 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/f46aa7338cd0318e8cd7b3a760dd6024576e0fbb/ghc
>---------------------------------------------------------------
commit f46aa7338cd0318e8cd7b3a760dd6024576e0fbb
Author: Peter Wortmann <scpmw at leeds.ac.uk>
Date: Sat Nov 29 00:07:48 2014 +0100
Debug data extraction (NCG support)
The purpose of the Debug module is to collect all required information
to generate debug information (DWARF etc.) in the back-ends. Our main
data structure is the "debug block", which carries all information we have
about a block of code that is going to get produced.
Notes:
* Debug blocks are arranged into a tree according to tick scopes. This
makes it easier to reason about inheritance rules. Note however that
tick scopes are not guaranteed to form a tree, which requires us to
"copy" ticks to not lose them.
* This is also where we decide what source location we regard as
representing a code block the "best". The heuristic is basically that
we want the most specific source reference that comes from the same file
we are currently compiling. This seems to be the most useful choice in
my experience.
* We are careful to not be too lazy so we don't end up breaking streaming.
Debug data will be kept alive until the end of codegen, after all.
* We change native assembler dumps to happen right away for every Cmm group.
This simplifies the code somewhat and is consistent with how pretty much
all of GHC handles dumps with respect to streamed code.
(From Phabricator D169)
>---------------------------------------------------------------
f46aa7338cd0318e8cd7b3a760dd6024576e0fbb
compiler/cmm/Debug.hs | 309 +++++++++++++++++++++++++++++++++++++++
compiler/ghc.cabal.in | 1 +
compiler/main/CodeOutput.hs | 11 +-
compiler/main/DynFlags.hs | 2 +
compiler/nativeGen/AsmCodeGen.hs | 135 ++++++++++-------
5 files changed, 404 insertions(+), 54 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 f46aa7338cd0318e8cd7b3a760dd6024576e0fbb
More information about the ghc-commits
mailing list