[commit: ghc] master: Encode alignment in MO_Memcpy and friends (a0d158f)

git at git.haskell.org git at git.haskell.org
Tue Jun 16 18:16:00 UTC 2015


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

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

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

commit a0d158fdd1db6b8f586bcbc1acd317d9836fb9dc
Merge: d46fdf2 681973c
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Tue Jun 16 20:16:16 2015 +0200

    Encode alignment in MO_Memcpy and friends
    
    Summary:
    Alignment needs to be a compile-time constant. Previously the code
    generators had to jump through hoops to ensure this was the case as the
    alignment was passed as a CmmExpr in the arguments list. Now we take
    care of this up front.
    
    This fixes #8131.
    
    Authored-by: Reid Barton <rwbarton at gmail.com>
    Dusted-off-by: Ben Gamari <ben at smart-cactus.org>
    
    Tests for T8131
    
    Test Plan: Validate
    
    Reviewers: rwbarton, austin
    
    Reviewed By: rwbarton, austin
    
    Subscribers: bgamari, carter, thomie
    
    Differential Revision: https://phabricator.haskell.org/D624
    
    GHC Trac Issues: #8131



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

a0d158fdd1db6b8f586bcbc1acd317d9836fb9dc
 compiler/cmm/CmmMachOp.hs                          | 29 ++++++++-----
 compiler/cmm/CmmParse.y                            | 37 +++++++++++-----
 compiler/cmm/PprC.hs                               | 12 +++---
 compiler/codeGen/StgCmmPrim.hs                     | 49 +++++++++++-----------
 compiler/llvmGen/LlvmCodeGen/CodeGen.hs            | 43 +++++++++----------
 compiler/nativeGen/PPC/CodeGen.hs                  | 20 +++------
 compiler/nativeGen/SPARC/CodeGen.hs                | 21 +++-------
 compiler/nativeGen/X86/CodeGen.hs                  | 25 ++++-------
 includes/Cmm.h                                     |  6 +--
 rts/PrimOps.cmm                                    |  8 ++--
 .../should_fail}/Makefile                          |  0
 .../should_fail}/T8131.cmm                         |  0
 testsuite/tests/codeGen/should_fail/all.T          |  3 ++
 .../should_gen_asm/memcpy-unroll-conprop.cmm       |  2 +-
 .../tests/codeGen/should_run/cgrun069_cmm.cmm      | 20 ++++-----
 testsuite/tests/llvm/should_compile/T8131b.hs      |  9 ++++
 testsuite/tests/llvm/should_compile/all.T          |  2 +-
 17 files changed, 145 insertions(+), 141 deletions(-)




More information about the ghc-commits mailing list