diff options
author | Johan Tibell <johan.tibell@gmail.com> | 2011-06-17 11:13:37 +0200 |
---|---|---|
committer | David Terei <davidterei@gmail.com> | 2011-06-17 13:33:44 -0700 |
commit | 530e25a6a1aaccc14630842f310bb4194ce97be0 (patch) | |
tree | 47e642dcd26b27c2fc48355d8dd72221e73a029f /compiler/codeGen/StgCmmPrim.hs | |
parent | caff8eab219f6a66b50f45148315c91014dd823d (diff) | |
download | haskell-530e25a6a1aaccc14630842f310bb4194ce97be0.tar.gz |
codeGen: Make emitCopyByteArray less pessimistic
Assigning the arguments to temporaries was only needed in the case of
emitCopyArray, where the arguments are alive across the call. That is
not the case in emitCopyByteArray.
Signed-off-by: David Terei <davidterei@gmail.com>
Diffstat (limited to 'compiler/codeGen/StgCmmPrim.hs')
-rw-r--r-- | compiler/codeGen/StgCmmPrim.hs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/compiler/codeGen/StgCmmPrim.hs b/compiler/codeGen/StgCmmPrim.hs index 66730afa50..1a6d05e6e6 100644 --- a/compiler/codeGen/StgCmmPrim.hs +++ b/compiler/codeGen/StgCmmPrim.hs @@ -747,17 +747,9 @@ emitCopyByteArray :: (CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> FCode ()) -> CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> CmmExpr -> FCode () -emitCopyByteArray copy src0 src_off0 dst0 dst_off0 n0 = do - -- Passed as arguments (be careful) - src <- assignTempE src0 - src_off <- assignTempE src_off0 - dst <- assignTempE dst0 - dst_off <- assignTempE dst_off0 - n <- assignTempE n0 - +emitCopyByteArray copy src src_off dst dst_off n = do dst_p <- assignTempE $ cmmOffsetExpr (cmmOffsetB dst arrWordsHdrSize) dst_off src_p <- assignTempE $ cmmOffsetExpr (cmmOffsetB src arrWordsHdrSize) src_off - copy src dst dst_p src_p n -- ---------------------------------------------------------------------------- |