[GHC] #5208: Unroll array copy/clone primops in the native and LLVM code generators

GHC cvs-ghc at haskell.org
Mon May 23 04:04:02 CEST 2011


#5208: Unroll array copy/clone primops in the native and LLVM code generators
---------------------------------+------------------------------------------
    Reporter:  tibbe             |       Owner:              
        Type:  feature request   |      Status:  new         
    Priority:  normal            |   Component:  Compiler    
     Version:  7.1               |    Keywords:              
    Testcase:                    |   Blockedby:              
          Os:  Unknown/Multiple  |    Blocking:              
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by dterei):

 OK so you can find a branch here adding MachOp's for memcpy, memset and
 memmove:

 https://github.com/dterei/ghc/tree/memcpy-prim

 It uses special LLVM intrinsics in the LLVM backend and just does
 appropriate calls in the NCG. It should be in working condition and ready
 to add to GHC basically. Probably should ask Ben Lippmeier to check the
 SPARC code is fine.

 I'm also attaching a test program to this ticket. You can use it like so:

 {{{
 gcc -c Return.c
 ghc -c MemOpsTest.cmm
 ghc --make Main.hs MemOpsTest.o Return.o
 ./Main
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5208#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the Glasgow-haskell-bugs mailing list