[Git][ghc/ghc][wip/hadrian-windows-bindist-cross] 17 commits: Be more eager in TyCon boot validity checking
Matthew Pickering (@mpickering)
gitlab at gitlab.haskell.org
Fri Aug 25 12:01:18 UTC 2023
Matthew Pickering pushed to branch wip/hadrian-windows-bindist-cross at Glasgow Haskell Compiler / GHC
Commits:
1420b8cb by Antoine Leblanc at 2023-08-24T16:18:17-04:00
Be more eager in TyCon boot validity checking
This commit performs boot-file consistency checking for TyCons into
checkValidTyCl. This ensures that we eagerly catch any mismatches,
which prevents the compiler from seeing these inconsistencies and
panicking as a result.
See Note [TyCon boot consistency checking] in GHC.Tc.TyCl.
Fixes #16127
- - - - -
d99c816f by Finley McIlwaine at 2023-08-24T16:18:55-04:00
Refactor estimation of stack info table provenance
This commit greatly refactors the way we compute estimated provenance for stack
info tables. Previously, this process was done using an entirely separate traversal
of the whole Cmm code stream to build the map from info tables to source locations.
The separate traversal is now fused with the Cmm code generation pipeline in
GHC.Driver.Main.
This results in very significant code generation speed ups when -finfo-table-map is
enabled. In testing, this patch reduces code generation times by almost 30% with
-finfo-table-map and -O0, and 60% with -finfo-table-map and -O1 or -O2 .
Fixes #23103
- - - - -
d3e0124c by Finley McIlwaine at 2023-08-24T16:18:55-04:00
Add a test checking overhead of -finfo-table-map
We want to make sure we don't end up with poor codegen performance resulting from
-finfo-table-map again as in #23103. This test adds a performance test tracking
total allocations while compiling ExactPrint with -finfo-table-map.
- - - - -
f204da9d by Matthew Pickering at 2023-08-25T12:47:13+01:00
hadrian: Add ghcToolchain to tool args list
This allows you to load ghc-toolchain and ghc-toolchain-bin into HLS.
- - - - -
f865a2ac by Matthew Pickering at 2023-08-25T12:47:13+01:00
ghc-toolchain: Normalise triple via config.sub
We were not normalising the target triple anymore like we did with the
old make build system.
Fixes #23856
- - - - -
83bf49f3 by Matthew Pickering at 2023-08-25T12:47:13+01:00
ghc-toolchain: Add missing vendor normalisation
This is copied from m4/ghc_convert_vendor.m4
Towards #23868
- - - - -
6d54b21c by Matthew Pickering at 2023-08-25T12:47:13+01:00
ghc-toolchain: Add loongarch64 to parseArch
Towards #23868
- - - - -
3a2d7678 by Matthew Pickering at 2023-08-25T12:47:13+01:00
Add same LD hack to ghc-toolchain
In the ./configure script, if you pass the `LD` variable then this has
the effect of stopping use searching for a linker and hence passing
`-fuse-ld=...`.
We want to emulate this logic in ghc-toolchain, if a use explicilty
specifies `LD` variable then don't add `-fuse-ld=..` with the goal of
making ./configure and ghc-toolchain agree on which flags to use when
using the C compiler as a linker.
This is quite unsavoury as we don't bake the choice of LD into the
configuration anywhere but what's important for now is making
ghc-toolchain and ./configure agree as much as possible.
See #23857 for more discussion
- - - - -
87ed1927 by Ben Gamari at 2023-08-25T12:47:13+01:00
ghc-toolchain: Check for C99 support with -std=c99
Previously we failed to try enabling C99 support with `-std=c99`, as
`autoconf` attempts. This broke on older compilers (e.g. CentOS 7) which
don't enable C99 by default.
Fixes #23879.
- - - - -
610a2abc by Matthew Pickering at 2023-08-25T12:47:13+01:00
ghc-toolchain: Add endianess check using __BYTE_ORDER__ macro
In very old toolchains the BYTE_ORDER macro is not set but thankfully
the __BYTE_ORDER__ macro can be used instead.
- - - - -
ceed5619 by Matthew Pickering at 2023-08-25T12:47:13+01:00
configure: AC_PATH_TARGET_TOOL for LD
We want to make sure that LD is set to an absolute path in order to be
consistent with the `LD=$(command -v ld)` call. The AC_PATH_TARGET_TOOL
macro uses the absolute path rather than AC_CHECK_TARGET_TOOL which
might use a relative path.
- - - - -
3bbfd5c4 by Matthew Pickering at 2023-08-25T12:47:13+01:00
ghc-toolchain: Check whether we need -std=gnu99 for CPP as well
In ./configure the C99 flag is passed to the C compiler when used as a C
preprocessor. So we also check the same thing in ghc-toolchain.
- - - - -
0ffdc402 by Matthew Pickering at 2023-08-25T12:47:13+01:00
Check for --target linker flag separately to C compiler
There are situations where the C compiler doesn't accept `--target` but
when used as a linker it does (but doesn't do anything most likely)
In particular with old gcc toolchains, the C compiler doesn't support
--target but when used as a linker it does.
- - - - -
ad575b4c by Matthew Pickering at 2023-08-25T12:47:13+01:00
Use Cc to compile test file in nopie check
We were attempting to use the C compiler, as a linker, to compile a file
in the nopie check, but that won't work in general as the flags we pass
to the linker might not be compatible with the ones we pass when using
the C compiler.
- - - - -
a7d69462 by Matthew Pickering at 2023-08-25T12:47:13+01:00
configure: Error when ghc-toolchain fails to compile
This is a small QOL change as if you are working on ghc-toolchain and it
fails to compile then configure will continue and can give you outdated
results.
- - - - -
45739b45 by Matthew Pickering at 2023-08-25T12:47:13+01:00
configure: Check whether -no-pie works when the C compiler is used as a linker
`-no-pie` is a flag we pass when using the C compiler as a linker (see
pieCCLDOpts in GHC.Driver.Session) so we should test whether the C
compiler used as a linker supports the flag, rather than just the C
compiler.
- - - - -
030287a7 by Matthew Pickering at 2023-08-25T12:47:13+01:00
ghc-toolchain: Remove javascript special case for --target detection
emcc when used as a linker seems to ignore the --target flag, and for
consistency with configure which now tests for --target, we remove this
special case.
- - - - -
30 changed files:
- compiler/GHC/Driver/GenerateCgIPEStub.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Tc/TyCl.hs
- compiler/GHC/Tc/TyCl/Utils.hs
- configure.ac
- hadrian/src/Rules/ToolArgs.hs
- m4/find_merge_objects.m4
- m4/fp_cc_supports_target.m4
- m4/fp_gcc_supports_no_pie.m4
- + m4/fp_prog_cc_linker_target.m4
- m4/ghc_toolchain.m4
- testsuite/tests/indexed-types/should_fail/ClosedFam3.stderr
- + testsuite/tests/profiling/perf/Makefile
- + testsuite/tests/profiling/perf/T23103/all.T
- + testsuite/tests/profiling/perf/T23103/info_table_map_perf.stderr
- + testsuite/tests/rename/should_fail/RnFail059.hs
- + testsuite/tests/rename/should_fail/RnFail059.hs-boot
- + testsuite/tests/rename/should_fail/RnFail059_aux.hs
- testsuite/tests/rename/should_fail/all.T
- testsuite/tests/rename/should_fail/rnfail055.stderr
- + testsuite/tests/rename/should_fail/rnfail059.stderr
- testsuite/tests/roles/should_fail/Roles12.stderr
- testsuite/tests/roles/should_fail/T9204.stderr
- + testsuite/tests/typecheck/T16127/T16127.hs
- + testsuite/tests/typecheck/T16127/T16127.hs-boot
- + testsuite/tests/typecheck/T16127/T16127.stderr
- + testsuite/tests/typecheck/T16127/T16127Helper.hs
- + testsuite/tests/typecheck/T16127/all.T
- testsuite/tests/typecheck/should_fail/T12035.stderr
- testsuite/tests/typecheck/should_fail/T12035j.stderr
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c0f8a8171817ab10b58d811509fc8d4143c9c6a9...030287a7fb5ccbe602caa0061532a53a69051eeb
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c0f8a8171817ab10b58d811509fc8d4143c9c6a9...030287a7fb5ccbe602caa0061532a53a69051eeb
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/20230825/c534ccba/attachment-0001.html>
More information about the ghc-commits
mailing list