Magnus pushed to branch wip/mangoiv/ci-stages at Glasgow Haskell Compiler / GHC Commits: 098bba70 by Facundo Domínguez at 2026-09-17T14:57:41-04:00 Remove the call to hoistFlag from processCmdLineP This call was undesirable because it was causing a reconstruction of the list of flag processors. Even relying on list fusion would not be sufficient because we want to replace the list with a data structure with faster lookups to address #25763. The removal is done in two moves: * We move CmdLineP to CmdLine.hs * Then we move the effect of hoisting to processArgs via a new function hoistEwM - - - - - e01799c7 by Facundo Domínguez at 2026-09-17T14:57:42-04:00 Do not create duplicate flag processors for the -W flag This makes simpler implementing the command line parser with a trie map holding flag processors. If we were to allow duplicate flag processors for any flag, the trie map would need to be a multimap. - - - - - 3875b257 by Facundo Domínguez at 2026-09-17T14:57:42-04:00 Replace the list of flag processors with a trie map in `processArgs` Previously `GHC.Driver.CmdLine.findArg` was called for each command-line argument, doing a linear search on the list of flag processors each time. This was somewhat costly as the list of flag processor has near 2000 elements. A lookup with a trie map is faster in general, but the speed up is only noticeable when calling `GHC.Driver.CmdLine.processArgs` sufficient times, so the amount of lookups piles up. This could happen in large projects with many units each having many dependencies. If only a module needs to be recompiled, the user still needs to wait for all of the flag parsing to complete. The benchmark at testsuite/tests/perf/compiler/cmdline-parser shows a 10x speed up when using the trie. The trie map is implemented in `GHC.Data.StringTrie`. The design is explained in Note [Processing command line argument fast] in GHC.Driver.Session. The commit also: * adds two property-based tests for trie map operations, * adds a benchmark of the command line parser, and * renames the predicate `arg_ok` to `valid_flag_suffix` to decide what flag processor should be used when there are multiple matching prefixes on a flag. Fixes #25763. - - - - - 5236634a by Andreas Klebinger at 2026-09-17T14:58:24-04:00 Compile Word64{Map,Set} with -O2 always. This is the hottest code and even if we build GHC with -O0 otherwise -O2 pays off for these modules. Fixes #27814. - - - - - c236efd5 by mangoiv at 2026-09-22T17:27:27+02:00 ci: build and test stage Split up CI in a build and test stage: 1. in the build stage, just produce a bindist as well as running the stage1 tests 2. in the test stage, install the bindist, then run the testsuite with out of tree args - - - - - 87108874 by mangoiv at 2026-09-22T17:28:50+02:00 ci: reorder packaging and testing stages - - - - - a643b245 by mangoiv at 2026-09-22T17:28:57+02:00 fix: out of tree compiler does not imply no hadrian being available - - - - - 9055d57b by mangoiv at 2026-09-22T17:28:57+02:00 fix: don't do msys deps check on stage1 compiler - - - - - e184f02d by mangoiv at 2026-09-22T17:28:57+02:00 configure: fix sed script and subst tooldir script Fixes #27672 - - - - - c84c334f by mangoiv at 2026-09-22T17:28:57+02:00 testsuite: flush more often when running testsuite - - - - - 3ca56806 by mangoiv at 2026-09-22T17:28:57+02:00 Allow metric decreases on windows Metric Decrease: LinkableUsage01 MultiLayerModulesTH_OneShot T10547 T12234 T12425 T13035 T13253-spj T13820 T18140 T18730 T18923 T9198 TcPlugin_RewritePerf mhu-perf - - - - - 57043557 by mangoiv at 2026-09-22T17:28:58+02:00 ci: stop using ellipses in testsuite output and output env before invoking hadrian - - - - - 7d90a638 by mangoiv at 2026-09-22T17:28:58+02:00 ci: clean up env before running tests even more - - - - - 45 changed files: - .gitlab-ci.yml - .gitlab/ci.sh - .gitlab/common.sh - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - + changelog.d/25763-cmdline-opt - + compiler/GHC/Data/StringTrie.hs - compiler/GHC/Data/Word64Map/Internal.hs - compiler/GHC/Data/Word64Map/Strict/Internal.hs - compiler/GHC/Data/Word64Set/Internal.hs - compiler/GHC/Driver/CmdLine.hs - compiler/GHC/Driver/Session.hs - compiler/ghc.cabal.in - distrib/configure.ac.in - + flake.lock - + flake.nix - ghc/GHC/Driver/Session/Mode.hs - hadrian/doc/cross-compile.md - hadrian/src/Base.hs - hadrian/src/Builder.hs - hadrian/src/Context.hs - hadrian/src/Flavour.hs - hadrian/src/Hadrian/Haskell/Hash.hs - hadrian/src/Hadrian/Package.hs - hadrian/src/Oracles/Flag.hs - hadrian/src/Oracles/Setting.hs - hadrian/src/Oracles/TestSettings.hs - hadrian/src/Packages.hs - hadrian/src/Rules/Generate.hs - hadrian/src/Rules/Program.hs - hadrian/src/Rules/Test.hs - hadrian/src/Settings/Builders/DeriveConstants.hs - hadrian/src/Settings/Builders/RunTest.hs - hadrian/src/Settings/Packages.hs - m4/subst_tooldir.m4 - testsuite/driver/runtests.py - testsuite/driver/testlib.py - testsuite/tests/MiniQuickCheck.hs - testsuite/tests/driver/all.T - + testsuite/tests/driver/stringtrie.hs - + testsuite/tests/driver/stringtrie.stdout - + testsuite/tests/perf/compiler/T25763.stderr - testsuite/tests/perf/compiler/all.T - + testsuite/tests/warnings/should_fail/WExpectedNoArgError.stderr - testsuite/tests/warnings/should_fail/all.T The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9a6e6445089a56781bb8f818038ade6... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/9a6e6445089a56781bb8f818038ade6... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Magnus (@MangoIV)