Wolfgang Jeltsch pushed to branch wip/jeltsch/more-efficient-home-unit-imports-finding.fendor-experiment at Glasgow Haskell Compiler / GHC Commits: da4c4d9f by Wolfgang Jeltsch at 2026-04-11T16:23:36+03:00 Consider also `ModuleNodeFixed` nodes for the cache - - - - - c6a61c47 by Wolfgang Jeltsch at 2026-04-11T16:30:04+03:00 Experimentally set `candidates` to `Set.empty` - - - - - 2 changed files: - compiler/GHC/Unit/Finder.hs - compiler/GHC/Unit/Module/Graph.hs Changes: ===================================== compiler/GHC/Unit/Finder.hs ===================================== @@ -255,7 +255,7 @@ findImportedModuleNoHsc fc fopts ue home_module_map mhome_unit mod_name mb_pkg = let providers = maybe dep_providers (\u -> Set.delete u dep_providers) current_unit_id in Set.toList providers unknown_units = - let candidates = Set.difference hpt_deps complete_units + let candidates = Set.empty -- Set.difference hpt_deps complete_units excluded = maybe dep_providers (\u -> Set.insert u dep_providers) current_unit_id in Set.toList (Set.difference candidates excluded) other_home_uids = known_other_uids ++ unknown_units ===================================== compiler/GHC/Unit/Module/Graph.hs ===================================== @@ -219,22 +219,18 @@ mkHomeModuleMap nodes = ModuleNameHomeMap completeUnits providerMap where providerMap = Map.fromListWith Set.union $ [ - (ms_mod_name modSummary, Set.singleton (ms_unitid modSummary)) | - ModuleNode _ (ModuleNodeCompile modSummary) <- nodes + (moduleName, Set.singleton unitID) | + ModuleNode _ moduleNodeInfo <- nodes, + let moduleName = moduleNodeInfoModuleName moduleNodeInfo, + let unitID = moduleNodeInfoUnitId moduleNodeInfo ] completeUnits :: Set UnitId - completeUnits - = Set.fromList $ - [ - ms_unitid modSummary | - ModuleNode _ (ModuleNodeCompile modSummary) <- nodes - ] - - {-NOTE: - The matching with `ModuleNodeCompile` results in nodes with - `ModuleNodeFixed` in their info being dropped. - -} + completeUnits = Set.fromList $ + [ + moduleNodeInfoUnitId moduleNodeInfo | + ModuleNode _ moduleNodeInfo <- nodes + ] mgHomeModuleMap :: ModuleGraph -> ModuleNameHomeMap mgHomeModuleMap = mg_home_map View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/170ba43002a011e8ca6f1e6bf7c5409... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/170ba43002a011e8ca6f1e6bf7c5409... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Wolfgang Jeltsch (@jeltsch)