[Git][ghc/ghc][wip/22188] 12 commits: haddock/doc: Drop version and release

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Mon Mar 3 17:32:59 UTC 2025



Matthew Pickering pushed to branch wip/22188 at Glasgow Haskell Compiler / GHC


Commits:
1ce9502e by Ben Gamari at 2025-02-27T04:48:29-05:00
haddock/doc: Drop version and release

We currently have no way of keeping this up-to-date with the project version
- - - - -
7f358f25 by Matthew Pickering at 2025-02-27T04:49:06-05:00
testsuite: Add test for :steplocal performance

This adds a simple test which exercises #25779

- - - - -
a6a3ffa6 by Sven Tennie at 2025-02-27T23:34:47-05:00
Do not deallocate stack for jump/switch table jumps

Though the name is misleading, we consider them to be branching. For
branch instructions we do not deallocate (parts of) the stack, but keep
the stack pointer (sp) intact.

- - - - -
39e51ddb by Sven Tennie at 2025-02-27T23:34:47-05:00
Add reproducer for dealloc instructions in switch table jump expressions (#25733)

Measures taken to make the test stable:

- Use 'a' as variable prefix, because X86 32bit stumbled over the
variable name 'i386'
- Flush stdout to make test output deterministic
- Use type annotations to support 32bit archs

- - - - -
d427df93 by Sylvain Henry at 2025-02-27T23:35:30-05:00
Remove redundant location strings in expectJust and friends (#25743)

Now we can use HasDebugCallStack instead to avoid cluttering the code
with strings and to avoid maintaining those strings (e.g. renaming them
when functions are renamed...).

- - - - -
90f1190e by Ben Gamari at 2025-02-28T20:53:53-05:00
compiler: Add export list to GHC.SysTools.Tasks

- - - - -
ec826009 by Ben Gamari at 2025-02-28T20:53:53-05:00
compiler: Pass --target to llvm-as

As noted in #25793, this is necessary due to potential ambiguity on
Apple machines with Rosetta.

- - - - -
9c1647d1 by Andreas Klebinger at 2025-02-28T20:54:30-05:00
cmmMachOpFoldM: Add missing pattern matches for bitcasts.

Fixes #25771

- - - - -
1f8dd609 by Matthew Pickering at 2025-03-03T16:44:38+00:00
ghci: Serialise mi_top_env

When loading core from interface files (or from a bytecode object in
future) it's important to store what the top-level context of a module
is.
Otherwise, when you load the module into GHCi from the interface files,
only exported identifiers from the top-level module are in scope on the
repl.

See the added test which demonstrates what this enables.

The context at the GHCi prompt is everything that's in-scope in the
TopEnvIface module. Since TopEnvIface imports identifier "a", we can
evaluate "a" in the repl.

In addition to all this, we can use this information in order to
implement reifyModule in a more principled manner.

This becomes even more important when you're debugging and what to set
break-points on functions which are not imported.

- - - - -
d9c8ea1a by Matthew Pickering at 2025-03-03T16:44:38+00:00
Implement reifyModule in terms of mi_top_env

mi_top_env provides precisely the information that reifyModule needs,
the user written imports.

This is important as it unblocks !9604 and #22188

Fixes #8489

- - - - -
590ecbd8 by Matthew Pickering at 2025-03-03T17:32:40+00:00
Add flag to control whether self-recompilation information is written to interface

This patch adds the flag -fwrite-self-recomp-info which controls whether
interface files contain the information necessary to answer the
question:

  Do I need to recompile myself or is this current interface file
  suitable?

Why? Most packages are only built once either by a distribution or cabal
and then placed into an immutable store, after which we will never ask
this question. Therefore we can derive two benefits from omitting this
information.

* Primary motivation: It vastly reduces the surface area for creating
  non-deterministic interface files. See issue #10424 which motivated a
  proper fix to that issue. Distributions have long contained versions
  of GHC which just have broken self-recompilation checking (in order to
  get deterministic interface files).

* Secondary motivation: This reduces the size of interface files
  slightly.. the `mi_usages` field can be quite big but probably this
  isn't such a great benefit.

* Third motivation: Conceptually clarity about which parts of an
  interface file are used in order to **communicate** with subsequent
  packages about the **interface** for a module. And which parts are
  used to self-communicate during recompilation checking.

In addition to this, the change alerted me to the incorrect
implemenation of the reifyModule function. See #8489 for more discussion
about how to fix this if anyone was so inclined. For now I just added a
warning `-Wreify-module-missing-info` which triggers if the module you
are trying to reify doesn't have a suitable interface. Interfaces which
are unsuitable include:

  * The GHC.Prim interface, which is a fake interface
  * Interfaces compiled with -fno-write-self-recomp-info

The main tracking issue is #22188 but fixes issues such as #10424 in a
proper way.

- - - - -
a97a1e28 by Matthew Pickering at 2025-03-03T17:32:40+00:00
Disable self recomp in release flavour

- - - - -


145 changed files:

- compiler/GHC.hs
- compiler/GHC/Cmm/LayoutStack.hs
- compiler/GHC/Cmm/Liveness.hs
- compiler/GHC/Cmm/MachOp.hs
- compiler/GHC/Cmm/Opt.hs
- compiler/GHC/Cmm/ProcPoint.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/BlockLayout.hs
- compiler/GHC/CmmToAsm/CFG.hs
- compiler/GHC/CmmToAsm/PPC/Instr.hs
- compiler/GHC/CmmToAsm/Reg/Graph/SpillCost.hs
- compiler/GHC/CmmToAsm/Reg/Linear/JoinToTargets.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/CmmToLlvm/CodeGen.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Coercion/Opt.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Make.hs
- compiler/GHC/Core/Opt/CprAnal.hs
- compiler/GHC/Core/Opt/FloatIn.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Opt/StaticArgs.hs
- compiler/GHC/Core/Opt/WorkWrap/Utils.hs
- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/TyCo/Subst.hs
- compiler/GHC/Core/TyCon/Env.hs
- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Data/FastString/Env.hs
- compiler/GHC/Data/Graph/Directed.hs
- compiler/GHC/Data/Graph/Directed/Reachability.hs
- compiler/GHC/Data/Maybe.hs
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Env.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Foreign/JavaScript.hs
- compiler/GHC/HsToCore/Match.hs
- compiler/GHC/HsToCore/Match/Constructor.hs
- compiler/GHC/HsToCore/Pmc/Desugar.hs
- compiler/GHC/HsToCore/Pmc/Solver.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Iface/Binary.hs
- compiler/GHC/Iface/Decl.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Load.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Iface/Recomp.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/Iface/Tidy.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/JS/Make.hs
- compiler/GHC/JS/Ppr.hs
- compiler/GHC/Linker/Deps.hs
- compiler/GHC/Parser/Header.hs
- compiler/GHC/Rename/Bind.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Runtime/Eval.hs
- compiler/GHC/Runtime/Interpreter.hs
- compiler/GHC/Settings/IO.hs
- compiler/GHC/Stg/EnforceEpt.hs
- compiler/GHC/Stg/EnforceEpt/Rewrite.hs
- compiler/GHC/Stg/EnforceEpt/Types.hs
- compiler/GHC/Stg/Unarise.hs
- compiler/GHC/StgToByteCode.hs
- compiler/GHC/StgToCmm/Expr.hs
- compiler/GHC/StgToCmm/Foreign.hs
- compiler/GHC/StgToCmm/Lit.hs
- compiler/GHC/StgToJS/Literal.hs
- compiler/GHC/SysTools/Tasks.hs
- compiler/GHC/Tc/Deriv/Generate.hs
- compiler/GHC/Tc/Deriv/Generics.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Gen/Match.hs
- compiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/Tc/Gen/Splice.hs
- compiler/GHC/Tc/Instance/Class.hs
- compiler/GHC/Tc/Instance/Family.hs
- compiler/GHC/Tc/TyCl.hs
- compiler/GHC/Tc/Types.hs
- compiler/GHC/Tc/Utils/TcType.hs
- compiler/GHC/Tc/Zonk/Type.hs
- compiler/GHC/Types/Avail.hs
- compiler/GHC/Types/Demand.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Types/Name/Env.hs
- compiler/GHC/Types/Name/Reader.hs
- compiler/GHC/Types/PkgQual.hs
- compiler/GHC/Types/Var/Env.hs
- compiler/GHC/Unit/Env.hs
- compiler/GHC/Unit/Home/Graph.hs
- compiler/GHC/Unit/Home/PackageTable.hs
- compiler/GHC/Unit/Module/Graph.hs
- compiler/GHC/Unit/Module/ModGuts.hs
- compiler/GHC/Unit/Module/ModIface.hs
- compiler/GHC/Unit/Module/ModSummary.hs
- compiler/GHC/Unit/State.hs
- compiler/GHC/Utils/Misc.hs
- distrib/configure.ac.in
- docs/users_guide/phases.rst
- docs/users_guide/using-warnings.rst
- ghc/GHCi/UI.hs
- hadrian/bindist/Makefile
- hadrian/cfg/system.config.in
- hadrian/src/Flavour.hs
- hadrian/src/Oracles/Setting.hs
- hadrian/src/Rules/Generate.hs
- hadrian/src/Settings/Flavours/Release.hs
- m4/fp_settings.m4
- + testsuite/tests/cmm/should_run/JumpTableNoStackDealloc.hs
- + testsuite/tests/cmm/should_run/JumpTableNoStackDealloc.stdout
- + testsuite/tests/cmm/should_run/JumpTableNoStackDeallocGen.hs
- + testsuite/tests/cmm/should_run/JumpTableNoStackDealloc_cmm.cmm
- testsuite/tests/cmm/should_run/all.T
- + testsuite/tests/driver/self-recomp/Makefile
- + testsuite/tests/driver/self-recomp/SelfRecomp01.hs
- + testsuite/tests/driver/self-recomp/SelfRecomp02.hs
- + testsuite/tests/driver/self-recomp/SelfRecomp03.hs
- + testsuite/tests/driver/self-recomp/SelfRecomp04.hs
- + testsuite/tests/driver/self-recomp/SelfRecomp04.stdout
- + testsuite/tests/driver/self-recomp/all.T
- testsuite/tests/ghci/should_run/Makefile
- + testsuite/tests/ghci/should_run/TopEnvIface.hs
- + testsuite/tests/ghci/should_run/TopEnvIface.stdout
- + testsuite/tests/ghci/should_run/TopEnvIface2.hs
- testsuite/tests/ghci/should_run/all.T
- testsuite/tests/perf/compiler/all.T
- + testsuite/tests/perf/compiler/interpreter_steplocal.hs
- + testsuite/tests/perf/compiler/interpreter_steplocal.script
- + testsuite/tests/perf/compiler/interpreter_steplocal.stdout
- utils/haddock/doc/conf.py


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/44dae5353ed1adff372f4257e537e66de9ee2208...a97a1e28dd5d1f0f28eb359661524aebe610c62e

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/44dae5353ed1adff372f4257e537e66de9ee2208...a97a1e28dd5d1f0f28eb359661524aebe610c62e
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/20250303/ca353a38/attachment-0001.html>


More information about the ghc-commits mailing list