diff options
author | Simon Marlow <marlowsd@gmail.com> | 2012-07-31 11:19:03 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2012-08-02 11:56:02 +0100 |
commit | 6ede0067a91a0da7f682c3ea1d6df938616e983a (patch) | |
tree | 967a755612581b3d578f9879b56353a830cfa4bb /compiler/codeGen/StgCmmForeign.hs | |
parent | d2361423f23c3381b5a7f57c3f9e6c2448cdac80 (diff) | |
download | haskell-6ede0067a91a0da7f682c3ea1d6df938616e983a.tar.gz |
Explicitly share some return continuations
Instead of relying on common-block-elimination to share return
continuations in the common case (case-alternative heap checks) we do
it explicitly. This isn't hard to do, is more robust, and saves some
compilation time. Full commentary in Note [sharing continuations].
Diffstat (limited to 'compiler/codeGen/StgCmmForeign.hs')
-rw-r--r-- | compiler/codeGen/StgCmmForeign.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/codeGen/StgCmmForeign.hs b/compiler/codeGen/StgCmmForeign.hs index 8c061cf00c..a6274662ad 100644 --- a/compiler/codeGen/StgCmmForeign.hs +++ b/compiler/codeGen/StgCmmForeign.hs @@ -51,7 +51,7 @@ import Control.Monad cgForeignCall :: ForeignCall -- the op -> [StgArg] -- x,y arguments -> Type -- result type - -> FCode () + -> FCode ReturnKind cgForeignCall (CCall (CCallSpec target cconv safety)) stg_args res_ty = do { cmm_args <- getFCallArgs stg_args @@ -90,6 +90,7 @@ cgForeignCall (CCall (CCallSpec target cconv safety)) stg_args res_ty AssignTo assign_to_these _ -> do { emitForeignCall safety assign_to_these call_target call_args CmmMayReturn + ; return AssignedDirectly } _something_else -> |