[Git][ghc/ghc][wip/testsuite-no-cusks-transitional] 3 commits: Add -fpolymorphic-specialisation flag (off by default at all optimisation levels)

Vladislav Zavialov (@int-index) gitlab at gitlab.haskell.org
Thu Jun 29 16:22:11 UTC 2023



Vladislav Zavialov pushed to branch wip/testsuite-no-cusks-transitional at Glasgow Haskell Compiler / GHC


Commits:
9f01d14b by Matthew Pickering at 2023-06-29T04:13:41-04:00
Add -fpolymorphic-specialisation flag (off by default at all optimisation levels)

Polymorphic specialisation has led to a number of hard to diagnose
incorrect runtime result bugs (see #23469, #23109, #21229, #23445) so
this commit introduces a flag `-fpolymorhphic-specialisation` which
allows users to turn on this experimental optimisation if they are
willing to buy into things going very wrong.

Ticket #23469

- - - - -
b1e611d5 by Ben Gamari at 2023-06-29T04:14:17-04:00
Rip out runtime linker/compiler checks

We used to choose flags to pass to the toolchain at runtime based on the
platform running GHC, and in this commit we drop all of those runtime
linker checks

Ultimately, this represents a change in policy: We no longer adapt at
runtime to the toolchain being used, but rather make final decisions
about the toolchain used at /configure time/
(we have deleted Note [Run-time linker info] altogether!).

This works towards the goal of having all toolchain configuration logic
living in the same place, which facilities the work towards a
runtime-retargetable GHC (see #19877).

As of this commit, the runtime linker/compiler logic was moved to
autoconf, but soon it, and the rest of the existing toolchain
configuration logic, will live in the standalone ghc-toolchain program
(see !9263)

In particular, what used to be done at runtime is now as follows:
* The flags -Wl,--no-as-needed for needed shared libs are configured
  into settings
* The flag -fstack-check is configured into settings
* The check for broken tables-next-to-code was outdated
* We use the configured c compiler by default as the assembler program
* We drop `asmOpts` because we already configure -Qunused-arguments flag
  into settings (see !10589)

Fixes #23562

Co-author: Rodrigo Mesquita (@alt-romes)

- - - - -
ae1968d3 by Vladislav Zavialov at 2023-06-29T16:22:09+00:00
testsuite: Do not require CUSKs

Numerous tests make use of CUSKs (complete user-supplied kinds),
a legacy feature scheduled for deprecation. In order to proceed
with the said deprecation, the tests have been updated to use SAKS
instead (standalone kind signatures).

This also allows us to remove the Haskell2010 language pragmas that
were added in 115cd3c85a8 to work around the lack of CUSKs in GHC2021.

- - - - -


30 changed files:

- compiler/GHC/Core/Opt/Specialise.hs
- compiler/GHC/Driver/Backend.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Linker/ExtraObj.hs
- compiler/GHC/SysTools.hs
- − compiler/GHC/SysTools/Info.hs
- compiler/GHC/SysTools/Tasks.hs
- compiler/ghc.cabal.in
- docs/users_guide/9.8.1-notes.rst
- docs/users_guide/using-optimisation.rst
- + m4/fp_link_supports_no_as_needed.m4
- m4/fptools_set_c_ld_flags.m4
- testsuite/tests/dependent/should_compile/Dep2.hs
- testsuite/tests/dependent/should_compile/DkNameRes.hs
- testsuite/tests/dependent/should_compile/KindEqualities2.hs
- testsuite/tests/dependent/should_compile/RaeBlogPost.hs
- testsuite/tests/dependent/should_compile/RaeJobTalk.hs
- testsuite/tests/dependent/should_compile/T11711.hs
- testsuite/tests/dependent/should_compile/T12442.hs
- testsuite/tests/dependent/should_compile/T14066a.hs
- testsuite/tests/dependent/should_compile/T14066a.stderr
- testsuite/tests/dependent/should_compile/T14556.hs
- testsuite/tests/dependent/should_compile/T14749.hs
- testsuite/tests/dependent/should_compile/T16326_Compile1.hs
- testsuite/tests/dependent/should_compile/TypeLevelVec.hs
- testsuite/tests/dependent/should_compile/dynamic-paper.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/caeb366db13ecdb8de40ed91f0af0e45351c7e07...ae1968d3a5fad94142bc992d290ba078e8074ba0

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/caeb366db13ecdb8de40ed91f0af0e45351c7e07...ae1968d3a5fad94142bc992d290ba078e8074ba0
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/20230629/feb2f030/attachment.html>


More information about the ghc-commits mailing list