-
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