[commit: ghc] ghc-8.2: Clean up opt and llc (be30d37)

git at git.haskell.org git at git.haskell.org
Sun Dec 23 18:46:45 UTC 2018


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

On branch  : ghc-8.2
Link       : http://ghc.haskell.org/trac/ghc/changeset/be30d37b2e8bd6b76525e20a0131314492fa4cc2/ghc

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

commit be30d37b2e8bd6b76525e20a0131314492fa4cc2
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
    
    (cherry picked from commit 22733532171330136d87533d523f565f2a4f102f)


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

be30d37b2e8bd6b76525e20a0131314492fa4cc2
 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 be30d37b2e8bd6b76525e20a0131314492fa4cc2


More information about the ghc-commits mailing list