[Git][ghc/ghc][wip/con-info] Fix diff
Matthew Pickering
gitlab at gitlab.haskell.org
Tue Nov 3 16:17:53 UTC 2020
Matthew Pickering pushed to branch wip/con-info at Glasgow Haskell Compiler / GHC
Commits:
0c9c403e by Matthew Pickering at 2020-11-03T16:17:37+00:00
Fix diff
- - - - -
6 changed files:
- compiler/GHC/StgToCmm.hs
- compiler/GHC/StgToCmm/Bind.hs
- compiler/GHC/StgToCmm/Closure.hs
- compiler/GHC/StgToCmm/Heap.hs
- compiler/GHC/StgToCmm/Monad.hs
- rts/Profiling.c
Changes:
=====================================
compiler/GHC/StgToCmm.hs
=====================================
@@ -263,6 +263,7 @@ cgDataCon mn data_con
| ty <- dataConRepArgTys data_con
, rep_ty <- typePrimRep (scaledThing ty)
, not (isVoidRep rep_ty) ]
+
; emitClosureAndInfoTable platform dyn_info_tbl NativeDirectCall [] $
-- NB: the closure pointer is assumed *untagged* on
-- entry to a constructor. If the pointer is tagged,
=====================================
compiler/GHC/StgToCmm/Bind.hs
=====================================
@@ -95,8 +95,8 @@ cgTopRhsClosure platform rec id ccs upd_flag args body =
gen_code _ closure_label
| StgApp f [] <- body, null args, isNonRec rec
= do
- cg_info <- getCgIdInfo f
- emitDataCon closure_label indStaticInfoTable ccs [unLit (idInfoToAmode cg_info)]
+ cg_info <- getCgIdInfo f
+ emitDataCon closure_label indStaticInfoTable ccs [unLit (idInfoToAmode cg_info)]
gen_code lf_info _closure_label
= do { profile <- getProfile
@@ -136,7 +136,7 @@ cgBind (StgNonRec name rhs)
-- init cannot be used in body, so slightly better to sink it eagerly
cgBind (StgRec pairs)
- = do { r <- sequence $ unzipWith cgRhs pairs
+ = do { r <- sequence $ unzipWith cgRhs pairs
; let (id_infos, fcodes) = unzip r
; addBindsC id_infos
; (inits, body) <- getCodeR $ sequence fcodes
=====================================
compiler/GHC/StgToCmm/Closure.hs
=====================================
@@ -924,7 +924,7 @@ mkDataConInfoTable profile data_con mn is_static ptr_wds nonptr_wds
| otherwise = ProfilingInfo ty_descr val_descr
ty_descr = BS8.pack $ occNameString $ getOccName $ dataConTyCon data_con
- val_descr = BS8.pack $ (occNameString $ getOccName data_con)
+ val_descr = BS8.pack $ occNameString $ getOccName data_con
-- We need a black-hole closure info to pass to @allocDynClosure@ when we
-- want to allocate the black hole on entry to a CAF.
=====================================
compiler/GHC/StgToCmm/Heap.hs
=====================================
@@ -49,10 +49,10 @@ import GHC.Driver.Session
import GHC.Platform
import GHC.Platform.Profile
import GHC.Data.FastString( mkFastString, fsLit )
+import GHC.Utils.Panic( sorry )
import Control.Monad (when)
import Data.Maybe (isJust)
-import GHC.Utils.Panic( sorry )
-----------------------------------------------------------
-- Initialise dynamic heap objects
=====================================
compiler/GHC/StgToCmm/Monad.hs
=====================================
@@ -472,6 +472,7 @@ newUnique = do
setState $ state { cgs_uniqs = us' }
return u
+------------------
getInfoDown :: FCode CgInfoDownwards
getInfoDown = FCode $ \info_down state -> (info_down,state)
=====================================
rts/Profiling.c
=====================================
@@ -6,8 +6,8 @@
*
* ---------------------------------------------------------------------------*/
-
#if defined(PROFILING)
+
#include "PosixSource.h"
#include "Rts.h"
@@ -57,7 +57,6 @@ CostCentre *CC_LIST = NULL;
// parent of all cost centres stacks (done in initProfiling2()).
static CostCentreStack *CCS_LIST = NULL;
-
#if defined(THREADED_RTS)
static Mutex ccs_mutex;
#endif
@@ -146,7 +145,6 @@ dumpCostCentresToEventLog(void)
#endif
}
-
void initProfiling (void)
{
// initialise our arena
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0c9c403e36795cabb32ad821d13d59b5c1993564
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0c9c403e36795cabb32ad821d13d59b5c1993564
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201103/06b1be34/attachment-0001.html>
More information about the ghc-commits
mailing list