Commit 305f6e34 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Merge branch 'master' of http://darcs.haskell.org/ghc

parents 24d630a8 951c3e2a
......@@ -349,12 +349,21 @@ else
compiler_CONFIGURE_OPTS += --ghc-option=-DNO_REGS
endif
# If we're profiling GHC then we want lots of SCCs, so -auto-all
# We also don't want to waste time building the non-profiling library.
# Unfortunately this means that we have to tell ghc-pkg --force as it
# gets upset when libHSghc-6.9.a doesn't exist.
ifeq "$(GhcProfiled)" "YES"
compiler_stage2_CONFIGURE_OPTS += --ghc-option=-auto-all
# If we're profiling GHC then we want SCCs. However, adding -auto-all
# everywhere tends to give a hard-to-read profile, and adds lots of
# overhead. A better approach is to proceed top-down; identify the
# parts of the compiler of interest, and then add further cost centres
# as necessary. Turn on -auto-all for individual modules like this:
compiler/main/DriverPipeline_HC_OPTS += -auto-all
compiler/main/GhcMake_HC_OPTS += -auto-all
compiler/main/GHC_HC_OPTS += -auto-all
# or alternatively addd {-# OPTIONS_GHC -auto-all #-} to the top of
# modules you're interested in.
# We seem to still build the vanilla libraries even if we say
# --disable-library-vanilla, but installation then fails, as Cabal
# doesn't copy the vanilla .hi files, but ghc-pkg complains about
......
......@@ -378,7 +378,9 @@ hscDesugar hsc_env mod_summary tc_result =
hscDesugar' :: ModSummary -> TcGblEnv -> Hsc ModGuts
hscDesugar' mod_summary tc_result = do
hsc_env <- getHscEnv
r <- ioMsgMaybe $ deSugar hsc_env (ms_location mod_summary) tc_result
r <- ioMsgMaybe $
{-# SCC "deSugar" #-}
deSugar hsc_env (ms_location mod_summary) tc_result
-- always check -Werror after desugaring, this is the last opportunity for
-- warnings to arise before the backend.
......@@ -1131,6 +1133,7 @@ hscWriteIface :: ModIface -> Bool -> ModSummary -> Hsc ()
hscWriteIface iface no_change mod_summary = do
dflags <- getDynFlags
unless no_change $
{-# SCC "writeIface" #-}
liftIO $ writeIfaceFile dflags (ms_location mod_summary) iface
-- | Compile to hard-code.
......@@ -1170,7 +1173,8 @@ hscGenHardCode cgguts mod_summary = do
------------------ Code generation ------------------
cmms <- if dopt Opt_TryNewCodeGen dflags
then tryNewCodeGen hsc_env this_mod data_tycons
then {-# SCC "NewCodeGen" #-}
tryNewCodeGen hsc_env this_mod data_tycons
cost_centre_info
stg_binds hpc_info
else {-# SCC "CodeGen" #-}
......@@ -1179,10 +1183,12 @@ hscGenHardCode cgguts mod_summary = do
stg_binds hpc_info
------------------ Code output -----------------------
rawcmms <- cmmToRawCmm platform cmms
rawcmms <- {-# SCC "cmmToRawCmm" #-}
cmmToRawCmm platform cmms
dumpIfSet_dyn dflags Opt_D_dump_raw_cmm "Raw Cmm" (pprPlatform platform rawcmms)
(_stub_h_exists, stub_c_exists)
<- codeOutput dflags this_mod location foreign_stubs
<- {-# SCC "codeOutput" #-}
codeOutput dflags this_mod location foreign_stubs
dependencies rawcmms
return stub_c_exists
......
......@@ -183,6 +183,7 @@ hs_init_ghc(int *argc, char **argv[], RtsConfig rts_config)
*/
getStablePtr((StgPtr)runIO_closure);
getStablePtr((StgPtr)runNonIO_closure);
getStablePtr((StgPtr)flushStdHandles_closure);
getStablePtr((StgPtr)runFinalizerBatch_closure);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment