[Git][ghc/ghc][wip/torsten.schmits/parallel-depanal-downsweep] backwards compat

Torsten Schmits (@torsten.schmits) gitlab at gitlab.haskell.org
Thu May 16 15:17:56 UTC 2024



Torsten Schmits pushed to branch wip/torsten.schmits/parallel-depanal-downsweep at Glasgow Haskell Compiler / GHC


Commits:
4fefec38 by Torsten Schmits at 2024-05-16T14:26:53+02:00
backwards compat

- - - - -


1 changed file:

- compiler/GHC/Driver/Make.hs


Changes:

=====================================
compiler/GHC/Driver/Make.hs
=====================================
@@ -242,9 +242,7 @@ depanalPartial excluded_mods allow_dup_roots = do
     -- cached finder data.
     liftIO $ flushFinderCaches (hsc_FC hsc_env) (hsc_unit_env hsc_env)
 
-    worker_limit <- liftIO $ mkWorkerLimit (hsc_dflags hsc_env)
     (errs, graph_nodes) <- liftIO $ downsweep
-      worker_limit
       hsc_env (mgModSummaries old_graph)
       excluded_mods allow_dup_roots
     let
@@ -1553,8 +1551,7 @@ type DownsweepCache = M.Map (UnitId, PkgQual, ModuleNameWithIsBoot) [Either Driv
 -- The returned list of [ModSummary] nodes has one node for each home-package
 -- module, plus one for any hs-boot files.  The imports of these nodes
 -- are all there, including the imports of non-home-package modules.
-downsweep :: WorkerLimit
-          -> HscEnv
+downsweep :: HscEnv
           -> [ModSummary]
           -- ^ Old summaries
           -> [ModuleName]       -- Ignore dependencies on these; treat
@@ -1566,7 +1563,18 @@ downsweep :: WorkerLimit
                 -- The non-error elements of the returned list all have distinct
                 -- (Modules, IsBoot) identifiers, unless the Bool is true in
                 -- which case there can be repeats
-downsweep n_jobs hsc_env old_summaries excl_mods allow_dup_roots
+downsweep hsc_env old_summaries excl_mods allow_dup_roots = do
+  worker_limit <- liftIO $ mkWorkerLimit (hsc_dflags hsc_env)
+  downsweep_workers worker_limit hsc_env old_summaries excl_mods allow_dup_roots
+
+downsweep_workers :: WorkerLimit
+                  -- ^ The number of workers we wish to run in parallel
+                  -> HscEnv
+                  -> [ModSummary]
+                  -> [ModuleName]
+                  -> Bool
+                  -> IO ([DriverMessages], [ModuleGraphNode])
+downsweep_workers n_jobs hsc_env old_summaries excl_mods allow_dup_roots
    = do
        (root_errs, rootSummariesOk) <-
          rootSummariesParallel n_jobs hsc_env



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4fefec384276979caec3e247561463f01b61d1a5

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4fefec384276979caec3e247561463f01b61d1a5
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/20240516/0d99e074/attachment-0001.html>


More information about the ghc-commits mailing list