[commit: ghc] master: Clean up opt and llc (2273353)

git at git.haskell.org git at git.haskell.org
Wed Sep 6 16:08:03 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/22733532171330136d87533d523f565f2a4f102f/ghc

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

commit 22733532171330136d87533d523f565f2a4f102f
Author: Moritz Angermann <moritz.angermann at gmail.com>
Date:   Wed Sep 6 11:31:01 2017 -0400

    Clean up opt and llc
    
    The LLVM backend shells out to LLVMs `opt` and `llc` tools. This clean
    up introduces a shared data structure to carry the arguments we pass to
    each tool so that corresponding flags are next to each other. It drops
    the hard coded data layouts in favor of using `-mtriple` and have LLVM
    infer them. Furthermore we add `clang` as a proper tool, so we don't
    rely on assuming that `clang` is called `clang` on the `PATH` when using
    `clang` as the assembler.  Finally this diff also changes the type of
    `optLevel` from `Int` to `Word`, as we do not have negative optimization
    levels.
    
    Reviewers: erikd, hvr, austin, rwbarton, bgamari, kavon
    
    Reviewed By: kavon
    
    Subscribers: michalt, Ericson2314, ryantrinkle, dfeuer, carter, simonpj,
    kavon, simonmar, thomie, erikd, snowleopard
    
    Differential Revision: https://phabricator.haskell.org/D3352


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

22733532171330136d87533d523f565f2a4f102f
 aclocal.m4                                 |   7 +
 compiler/llvmGen/LlvmCodeGen.hs            |  11 +-
 compiler/llvmGen/LlvmCodeGen/Ppr.hs        |  63 +-------
 compiler/main/DriverPipeline.hs            | 237 ++++++++++++++++++-----------
 compiler/main/DynFlags.hs                  |  36 ++++-
 compiler/main/GHC.hs                       |   3 +-
 compiler/main/SysTools.hs                  |  21 ++-
 compiler/nativeGen/RegAlloc/Linear/Main.hs |   2 +-
 configure.ac                               |   7 +
 ghc.mk                                     |   7 +-
 ghc/GHCi/UI.hs                             |   4 +-
 ghc/ghc.mk                                 |   5 +
 llvm-targets                               |  22 +++
 mk/config.mk.in                            |   1 +
 settings.in                                |   3 +-
 testsuite/mk/ghc-config.hs                 |   1 +
 testsuite/tests/perf/compiler/all.T        |   6 +-
 utils/llvm-targets/gen-data-layout.sh      |  80 ++++++++++
 18 files changed, 342 insertions(+), 174 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 22733532171330136d87533d523f565f2a4f102f


More information about the ghc-commits mailing list