diff options
| author | Simon Marlow <simonmar@microsoft.com> | 2007-01-22 11:40:16 +0000 |
|---|---|---|
| committer | Simon Marlow <simonmar@microsoft.com> | 2007-01-22 11:40:16 +0000 |
| commit | a2d78ebe0451484e20ad3dc4d7f662e8c1e9650e (patch) | |
| tree | 20ed5d923d9e9b2deba08d26516453ea53434c48 /compiler/codeGen/CgCallConv.hs | |
| parent | 61213f56c7dd51ca3d5175c9e0e9fb946ba19108 (diff) | |
| download | haskell-a2d78ebe0451484e20ad3dc4d7f662e8c1e9650e.tar.gz | |
Semi-tagging optimisation
In the generated code for case-of-variable, test the tag of the
scrutinee closure and only enter if it is unevaluated. Also turn
*off* vectored returns.
Diffstat (limited to 'compiler/codeGen/CgCallConv.hs')
| -rw-r--r-- | compiler/codeGen/CgCallConv.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/codeGen/CgCallConv.hs b/compiler/codeGen/CgCallConv.hs index 895552b37f..b48b7d52b4 100644 --- a/compiler/codeGen/CgCallConv.hs +++ b/compiler/codeGen/CgCallConv.hs @@ -267,10 +267,9 @@ ctrlReturnConvAlg :: TyCon -> CtrlReturnConvention ctrlReturnConvAlg tycon = case (tyConFamilySize tycon) of size -> -- we're supposed to know... - -- Disable vectored returns --- if (size > (1::Int) && size <= mAX_FAMILY_SIZE_FOR_VEC_RETURNS) then --- VectoredReturn size --- else + if (size > (1::Int) && size <= mAX_FAMILY_SIZE_FOR_VEC_RETURNS) then + VectoredReturn size + else UnvectoredReturn size -- NB: unvectored returns Include size 0 (no constructors), so that -- the following perverse code compiles (it crashed GHC in 5.02) |
