[commit: ghc] master: LLVM: Factor out accumulation of LLVM statements and variables (9539408)

git at git.haskell.org git at git.haskell.org
Fri Oct 2 14:32:42 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/953940850f7f2aaf53d91e882a3216bfcf30c8f5/ghc

>---------------------------------------------------------------

commit 953940850f7f2aaf53d91e882a3216bfcf30c8f5
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Fri Oct 2 15:49:24 2015 +0200

    LLVM: Factor out accumulation of LLVM statements and variables
    
    The LLVM code generator currently has a rather large amount of
    boilerplate devoted to piping around and building up various AST
    elements. This is rather unfortunate for a language which prides itself
    on ease of abstraction and detracts from readability.
    
    Here I continue a refactoring that I originally suggested in D991, using
    `WriterT` to factor out this pattern. `WriterT` is in general a bit
    problematic from an evaluation perspective, but the expressions here are
    small enough that it should be a problem in practice.
    
    Test Plan: Validate
    
    Reviewers: austin
    
    Reviewed By: austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1286


>---------------------------------------------------------------

953940850f7f2aaf53d91e882a3216bfcf30c8f5
 compiler/llvmGen/LlvmCodeGen/CodeGen.hs | 386 ++++++++++++++++----------------
 1 file changed, 189 insertions(+), 197 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 953940850f7f2aaf53d91e882a3216bfcf30c8f5


More information about the ghc-commits mailing list