- -- Note: we don't register/etc if compiling Prelude bits.
-
- mkAbstractCs [
- if compiling_prelude
- then AbsCNop
- else mkAbstractCs [mkAbstractCs (map (CCostCentreDecl True) local_CCs),
- mkAbstractCs (map (CCostCentreDecl False) extern_CCs),
- mkCcRegister local_CCs import_names],
+ --
+ cost_centre_stuff
+ | not opt_SccProfilingOn = AbsCNop
+ | otherwise = mkAbstractCs (
+ map (CCostCentreDecl True) local_CCs ++
+ map (CCostCentreDecl False) extern_CCs ++
+ map CCostCentreStackDecl singleton_CCSs ++
+ mkCcRegister local_CCs singleton_CCSs import_names
+ )
+ in
+ mkAbstractCs [ cost_centre_stuff, module_code ]