[commit: ghc] master: Remove OldCmm, convert backends to consume new Cmm (d92bd17)

Simon Marlow <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/d92bd17ffd8715f77fd49de0fed6e39c8d0ec28b

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

commit d92bd17ffd8715f77fd49de0fed6e39c8d0ec28b
Author: Simon Marlow <[email protected]>
Date:   Mon Nov 12 11:47:51 2012 +0000

    Remove OldCmm, convert backends to consume new Cmm
    
    This removes the OldCmm data type and the CmmCvt pass that converts
    new Cmm to OldCmm.  The backends (NCGs, LLVM and C) have all been
    converted to consume new Cmm.
    
    The main difference between the two data types is that conditional
    branches in new Cmm have both true/false successors, whereas in OldCmm
    the false case was a fallthrough.  To generate slightly better code we
    occasionally need to invert a conditional to ensure that the
    branch-not-taken becomes a fallthrough; this was previously done in
    CmmCvt, and it is now done in CmmContFlowOpt.
    
    We could go further and use the Hoopl Block representation for native
    code, which would mean that we could use Hoopl's postorderDfs and
    analyses for native code, but for now I've left it as is, using the
    old ListGraph representation for native code.

 compiler/cmm/Cmm.hs                                |   39 +++-
 compiler/cmm/CmmContFlowOpt.hs                     |   45 +++-
 compiler/cmm/CmmCvt.hs                             |  117 --------
 compiler/cmm/CmmInfo.hs                            |   32 +--
 compiler/cmm/CmmNode.hs                            |   14 +-
 compiler/cmm/CmmOpt.hs                             |    7 +-
 compiler/cmm/CmmPipeline.hs                        |   12 +
 compiler/cmm/CmmUtils.hs                           |   14 +-
 compiler/cmm/OldCmm.hs                             |  279 --------------------
 compiler/cmm/OldCmmLint.hs                         |  212 ---------------
 compiler/cmm/OldCmmUtils.hs                        |  100 -------
 compiler/cmm/OldPprCmm.hs                          |  224 ----------------
 compiler/cmm/PprC.hs                               |  131 +++++-----
 compiler/cmm/PprCmmExpr.hs                         |    1 -
 compiler/codeGen/CgUtils.hs                        |   87 ++----
 compiler/ghc.cabal.in                              |    5 -
 compiler/llvmGen/LlvmCodeGen.hs                    |   17 +-
 compiler/llvmGen/LlvmCodeGen/Base.hs               |    2 +-
 compiler/llvmGen/LlvmCodeGen/CodeGen.hs            |  197 +++++++-------
 compiler/llvmGen/LlvmCodeGen/Data.hs               |    2 +-
 compiler/llvmGen/LlvmCodeGen/Ppr.hs                |    2 +-
 compiler/main/CodeOutput.lhs                       |    4 +-
 compiler/main/HscMain.hs                           |   16 +-
 compiler/nativeGen/AsmCodeGen.lhs                  |   66 +++---
 compiler/nativeGen/Instruction.hs                  |   14 +-
 compiler/nativeGen/PIC.hs                          |    2 +-
 compiler/nativeGen/PPC/CodeGen.hs                  |   72 +++---
 compiler/nativeGen/PPC/Instr.hs                    |    2 +-
 compiler/nativeGen/PPC/Ppr.hs                      |    2 +-
 compiler/nativeGen/PPC/RegInfo.hs                  |    2 +-
 compiler/nativeGen/PPC/Regs.hs                     |    2 +-
 compiler/nativeGen/RegAlloc/Graph/Coalesce.hs      |    2 +-
 compiler/nativeGen/RegAlloc/Graph/Spill.hs         |    2 +-
 compiler/nativeGen/RegAlloc/Graph/SpillClean.hs    |    2 +-
 compiler/nativeGen/RegAlloc/Graph/SpillCost.hs     |    2 +-
 compiler/nativeGen/RegAlloc/Graph/Stats.hs         |    3 +-
 .../nativeGen/RegAlloc/Linear/JoinToTargets.hs     |    1 -
 compiler/nativeGen/RegAlloc/Linear/Main.hs         |   15 +-
 compiler/nativeGen/RegAlloc/Linear/Stats.hs        |    2 -
 compiler/nativeGen/RegAlloc/Liveness.hs            |   13 +-
 compiler/nativeGen/SPARC/CodeGen.hs                |   73 +++---
 compiler/nativeGen/SPARC/CodeGen/Amode.hs          |    2 +-
 compiler/nativeGen/SPARC/CodeGen/Base.hs           |    3 +-
 compiler/nativeGen/SPARC/CodeGen/CondCode.hs       |    2 +-
 compiler/nativeGen/SPARC/CodeGen/Expand.hs         |    2 +-
 compiler/nativeGen/SPARC/CodeGen/Gen32.hs          |    2 +-
 compiler/nativeGen/SPARC/CodeGen/Gen32.hs-boot     |    2 +-
 compiler/nativeGen/SPARC/CodeGen/Gen64.hs          |    2 +-
 compiler/nativeGen/SPARC/CodeGen/Sanity.hs         |    4 +-
 compiler/nativeGen/SPARC/Imm.hs                    |    2 +-
 compiler/nativeGen/SPARC/Instr.hs                  |    2 +-
 compiler/nativeGen/SPARC/Ppr.hs                    |    4 +-
 compiler/nativeGen/SPARC/ShortcutJump.hs           |    2 +-
 compiler/nativeGen/Size.hs                         |    2 +-
 compiler/nativeGen/X86/CodeGen.hs                  |  220 ++++++++--------
 compiler/nativeGen/X86/Instr.hs                    |    2 +-
 compiler/nativeGen/X86/Ppr.hs                      |    2 +-
 compiler/nativeGen/X86/Regs.hs                     |    2 +-
 compiler/types/TyCon.lhs                           |   68 ++++-
 59 files changed, 678 insertions(+), 1483 deletions(-)


Diff suppressed because of size. To see it, use:

    git show d92bd17ffd8715f77fd49de0fed6e39c8d0ec28b
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.