diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-09-13 23:35:14 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-09-17 09:43:05 -0400 |
commit | 18283be3db288d21b79de7d65756a3442371c27f (patch) | |
tree | 189182c1dce96d530fade081f99d219477d42853 | |
parent | ef8a3fbf1363ba512d6d2c1a508473d6144e3d72 (diff) | |
download | haskell-18283be3db288d21b79de7d65756a3442371c27f.tar.gz |
compiler: Ensure that all CoreTodos have SCCs
In #20365 we noticed that a significant amount of time is spend in the
Core2Core cost-center, suggesting that some passes are likely missing
SCC pragmas. Try to fix this.
-rw-r--r-- | compiler/GHC/Core/Lint.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Core/Opt/Pipeline.hs | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/compiler/GHC/Core/Lint.hs b/compiler/GHC/Core/Lint.hs index 405f2c1116..9fdccffc40 100644 --- a/compiler/GHC/Core/Lint.hs +++ b/compiler/GHC/Core/Lint.hs @@ -3296,7 +3296,7 @@ dupExtVars vars -- consistency checks: We check this by running the given task twice, -- noting all differences between the results. lintAnnots :: SDoc -> (ModGuts -> CoreM ModGuts) -> ModGuts -> CoreM ModGuts -lintAnnots pname pass guts = do +lintAnnots pname pass guts = {-# SCC "lintAnnots" #-} do -- Run the pass as we normally would dflags <- getDynFlags logger <- getLogger diff --git a/compiler/GHC/Core/Opt/Pipeline.hs b/compiler/GHC/Core/Opt/Pipeline.hs index 4d1b4cbc59..77a34a9619 100644 --- a/compiler/GHC/Core/Opt/Pipeline.hs +++ b/compiler/GHC/Core/Opt/Pipeline.hs @@ -525,9 +525,11 @@ doCorePass pass guts = do CoreAddCallerCcs -> {-# SCC "AddCallerCcs" #-} addCallerCostCentres guts - CoreDoPrintCore -> liftIO $ printCore logger (mg_binds guts) >> return guts + CoreDoPrintCore -> {-# SCC "PrintCore" #-} + liftIO $ printCore logger (mg_binds guts) >> return guts - CoreDoRuleCheck phase pat -> ruleCheckPass phase pat guts + CoreDoRuleCheck phase pat -> {-# SCC "RuleCheck" #-} + ruleCheckPass phase pat guts CoreDoNothing -> return guts CoreDoPasses passes -> runCorePasses passes guts |