[Git][ghc/ghc][master] Add StgFromCore and StgCodeGen linting
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Tue Jul 18 10:40:08 UTC 2023
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
257f1567 by Jaro Reinders at 2023-07-18T06:39:29-04:00
Add StgFromCore and StgCodeGen linting
- - - - -
1 changed file:
- compiler/GHC/Stg/Pipeline.hs
Changes:
=====================================
compiler/GHC/Stg/Pipeline.hs
=====================================
@@ -74,6 +74,7 @@ stg2stg :: Logger
-> IO ([(CgStgTopBinding,IdSet)], StgCgInfos) -- output program
stg2stg logger extra_vars opts this_mod binds
= do { dump_when Opt_D_dump_stg_from_core "Initial STG:" binds
+ ; stg_linter False "StgFromCore" binds
; showPass logger "Stg2Stg"
-- Do the main business!
; binds' <- runStgM 'g' $
@@ -92,10 +93,12 @@ stg2stg logger extra_vars opts this_mod binds
; let (binds_sorted_with_fvs, imp_fvs) = unzip (depSortWithAnnotStgPgm this_mod binds')
-- See Note [Tag inference for interactive contexts]
; (cg_binds, cg_infos) <- inferTags (stgPipeline_pprOpts opts) (stgPipeline_forBytecode opts) logger this_mod binds_sorted_with_fvs
+ ; stg_linter False "StgCodeGen" cg_binds
; pure (zip cg_binds imp_fvs, cg_infos)
}
where
+ stg_linter :: (BinderP a ~ Id, OutputablePass a) => Bool -> String -> [GenStgTopBinding a] -> IO ()
stg_linter unarised
| Just diag_opts <- stgPipeline_lint opts
= lintStgTopBindings
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/257f1567395be441ebf7ada996e4edf36abbe7e9
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/257f1567395be441ebf7ada996e4edf36abbe7e9
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/20230718/fb62fe95/attachment-0001.html>
More information about the ghc-commits
mailing list