summaryrefslogtreecommitdiff
path: root/compiler/cmm/CmmInfo.hs
diff options
context:
space:
mode:
authorMax Bolingbroke <batterseapower@hotmail.com>2011-07-06 18:01:02 +0100
committerMax Bolingbroke <batterseapower@hotmail.com>2011-07-07 08:44:20 +0100
commitdd391759500ab2b6abd23d502ade7ff8946c780f (patch)
treeccb4c968c5aea99524d4a8a2b9e94d400e14826a /compiler/cmm/CmmInfo.hs
parent41ca0b8dcb91cf02f389b3d099c33fbdf009312c (diff)
downloadhaskell-dd391759500ab2b6abd23d502ade7ff8946c780f.tar.gz
Don't export the _info symbol for the data constructor worker bindings
This is safe because GHC never generates a fast call to a data constructor worker: if the call is seen statically it will be eta-expanded and the allocation of the data will be inlined. We still need to export the _closure in case the constructor is used in an unapplied fashion.
Diffstat (limited to 'compiler/cmm/CmmInfo.hs')
-rw-r--r--compiler/cmm/CmmInfo.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/cmm/CmmInfo.hs b/compiler/cmm/CmmInfo.hs
index 107e64f2d4..47d0c8b004 100644
--- a/compiler/cmm/CmmInfo.hs
+++ b/compiler/cmm/CmmInfo.hs
@@ -28,7 +28,7 @@ import Data.Bits
-- When we split at proc points, we need an empty info table.
emptyContInfoTable :: CmmInfoTable
-emptyContInfoTable = CmmInfoTable False (ProfilingInfo zero zero) rET_SMALL
+emptyContInfoTable = CmmInfoTable False False (ProfilingInfo zero zero) rET_SMALL
(ContInfo [] NoC_SRT)
where zero = CmmInt 0 wordWidth
@@ -80,8 +80,8 @@ mkInfoTable uniq (CmmProc (CmmInfo _ _ info) entry_label blocks) =
-- Code without an info table. Easy.
CmmNonInfoTable -> [CmmProc Nothing entry_label blocks]
- CmmInfoTable _ (ProfilingInfo ty_prof cl_prof) type_tag type_info ->
- let info_label = entryLblToInfoLbl entry_label
+ CmmInfoTable is_local _ (ProfilingInfo ty_prof cl_prof) type_tag type_info ->
+ let info_label = (if is_local then localiseLabel else id) $ entryLblToInfoLbl entry_label
ty_prof' = makeRelativeRefTo info_label ty_prof
cl_prof' = makeRelativeRefTo info_label cl_prof
in case type_info of