[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 26 commits: Add a flag -fkeep-auto-rules to optionally keep auto-generated rules around.
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Tue Oct 10 20:21:06 UTC 2023
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
e96c51cb by Andreas Klebinger at 2023-10-10T16:44:27+01:00
Add a flag -fkeep-auto-rules to optionally keep auto-generated rules around.
The motivation for the flag is given in #21917.
- - - - -
d0d1c883 by Matthew Pickering at 2023-10-10T16:20:28-04:00
hadrian: Add ghcToolchain to tool args list
This allows you to load ghc-toolchain and ghc-toolchain-bin into HLS.
- - - - -
360bfffb by Matthew Pickering at 2023-10-10T16:20:28-04: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
- - - - -
4f8710e9 by Matthew Pickering at 2023-10-10T16:20:28-04:00
ghc-toolchain: Add missing vendor normalisation
This is copied from m4/ghc_convert_vendor.m4
Towards #23868
- - - - -
a9746fb9 by Matthew Pickering at 2023-10-10T16:20:28-04:00
ghc-toolchain: Add loongarch64 to parseArch
Towards #23868
- - - - -
9f8adb91 by Matthew Pickering at 2023-10-10T16:20:28-04: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
- - - - -
40cf1ecc by Ben Gamari at 2023-10-10T16:20:28-04: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.
- - - - -
ff687a58 by Matthew Pickering at 2023-10-10T16:20:28-04: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.
- - - - -
1a13593a by Matthew Pickering at 2023-10-10T16:20:28-04: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.
- - - - -
94a6bbea by Matthew Pickering at 2023-10-10T16:20:28-04: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.
- - - - -
6fd435eb by Matthew Pickering at 2023-10-10T16:20:28-04: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.
- - - - -
11259d4d by Matthew Pickering at 2023-10-10T16:20:28-04: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.
- - - - -
95c45b78 by Matthew Pickering at 2023-10-10T16:20:28-04: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.
- - - - -
3cc115a2 by Matthew Pickering at 2023-10-10T16:20:28-04: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.
- - - - -
bff6f7a9 by Matthew Pickering at 2023-10-10T16:20:28-04: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.
- - - - -
078c6ef4 by Ben Gamari at 2023-10-10T16:20:28-04:00
toolchain: Don't pass --target to emscripten toolchain
As noted in `Note [Don't pass --target to emscripten toolchain]`,
emscripten's `emcc` is rather inconsistent with respect to its treatment
of the `--target` flag. Avoid this by special-casing this toolchain
in the `configure` script and `ghc-toolchain`.
Fixes on aspect of #23744.
- - - - -
2e4ef24d by Matthew Pickering at 2023-10-10T16:20:28-04:00
hadrian: Don't pass `--gcc-options` as a --configure-arg to cabal configure
Stop passing -gcc-options which mixed together linker flags and
non-linker flags. There's no guarantee the C compiler will accept both
of these in each mode.
- - - - -
8646a3a3 by Ben Gamari at 2023-10-10T16:20:28-04:00
configure: Probe stage0 link flags
For consistency with later stages and CC.
- - - - -
4f95a137 by Sebastian Graf at 2023-10-10T16:20:29-04:00
Stricter Binary.get in GHC.Types.Unit (#23964)
I noticed some thunking while looking at Core.
This change has very modest, but throughout positive ghc/alloc effect:
```
hard_hole_fits(normal) ghc/alloc 283,057,664 281,620,872 -0.5%
geo. mean -0.1%
minimum -0.5%
maximum +0.0%
```
Fixes #23964.
- - - - -
7647e0de by Bryan Richter at 2023-10-10T16:20:30-04:00
rel_eng/upload.sh cleanups
- - - - -
50cd1c3f by doyougnu at 2023-10-10T16:20:33-04:00
ci: add javascript label rule
This adds a rule which triggers the javascript job when the "javascript"
label is assigned to an MR.
- - - - -
7328c718 by Matthew Craven at 2023-10-10T16:20:33-04:00
Make 'wWarningFlagsDeps' include every WarningFlag
Fixes #24071.
- - - - -
b86acacd by Jan HrĨek at 2023-10-10T16:20:38-04:00
Fix pretty printing of overlap pragmas in TH splices (fixes #24074)
- - - - -
fec59481 by Andreas Klebinger at 2023-10-10T16:20:39-04:00
Aarch64 NCG: Use encoded immediates for literals.
Try to generate
instr x2, <imm>
instead of
mov x1, lit
instr x2, x1
When possible. This get's rid if quite a few redundant
mov instructions.
I believe this causes a metric decrease for LargeRecords as
we reduce register pressure.
-------------------------
Metric Decrease:
LargeRecord
-------------------------
- - - - -
a75b56d9 by Andreas Klebinger at 2023-10-10T16:20:39-04:00
AArch NCG: Refactor getRegister'
Remove some special cases which can be handled just as well by the
generic case.
This increases code re-use while also fixing #23749. Since some of the
special case wasn't upholding Note [Signed arithmetic on AArch64].
- - - - -
36a26049 by Andreas Klebinger at 2023-10-10T16:20:39-04:00
Aarch ncg: Optimize immediate use for address calculations
When the offset doesn't fit into the immediate we now just reuse the
general getRegister' code path which is well optimized to compute the
offset into a register instead of a special case for CmmRegOff.
This means we generate a lot less code under certain conditions which is
why performance metrics for these improve.
-------------------------
Metric Decrease:
T4801
T5321FD
T5321Fun
-------------------------
- - - - -
30 changed files:
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- .gitlab/rel_eng/upload.sh
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
- compiler/GHC/CmmToAsm/AArch64/Regs.hs
- compiler/GHC/Driver/Config/Tidy.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Iface/Tidy.hs
- compiler/GHC/ThToHs.hs
- compiler/GHC/Unit/Types.hs
- configure.ac
- docs/users_guide/using-optimisation.rst
- hadrian/doc/testsuite.md
- hadrian/src/Rules/ToolArgs.hs
- hadrian/src/Settings/Builders/Cabal.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/simplCore/should_compile/T21917.hs
- + testsuite/tests/simplCore/should_compile/T21917.stderr
- testsuite/tests/simplCore/should_compile/all.T
- + testsuite/tests/th/T24074.hs
- + testsuite/tests/th/T24074.stderr
- testsuite/tests/th/all.T
- utils/ghc-toolchain/exe/Main.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c48f2a4f2b07a049bbe12c7da64fd362b430c290...36a260492ffea091ee3ace7c78b0c824ab54e9ec
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c48f2a4f2b07a049bbe12c7da64fd362b430c290...36a260492ffea091ee3ace7c78b0c824ab54e9ec
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/20231010/472a102b/attachment-0001.html>
More information about the ghc-commits
mailing list