[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 6 commits: Revert "Division by constants optimization"

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon Jan 20 13:32:35 UTC 2025



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
b6f54188 by Ben Gamari at 2025-01-18T12:38:46-05:00
Revert "Division by constants optimization"

This appears to be responsible for the regression described in #25653.

This reverts commit daff1e30219d136977c71f42e82ccc58c9013cfb.

- - - - -
0fd90de8 by Ben Gamari at 2025-01-18T12:38:46-05:00
testsuite: Introduce div2 test

This is a useful test from !8392 which is worth keeping around.

- - - - -
32680979 by Ben Gamari at 2025-01-18T12:38:46-05:00
testsuite: Test shift correctness in mul2 test

- - - - -
163aa50a by Ben Gamari at 2025-01-18T12:38:46-05:00
testsuite: Add regression test for #25653

- - - - -
44778963 by Matthew Pickering at 2025-01-20T11:23:08+00:00
driver: Store an ExternalModuleGraph in the EPS

We now store an ExternalModuleGraph in the EPS. When an new interface is
loaded, the module graph is extended with a node for the loaded
interface. The result is a partial module graph. If you want to run
a transitive closure query on the graph you must first force the
transitive closure to be loaded by using `loadExternalGraphBelow`.

The primary advantage (for now) is that the transitive dependency
calculation does not have to be repeated in getLinkDeps. If your module
had many dependencies and many splices, performing this calculation at
every splice site took a significant amount of time.

We might also want to use this module graph in future for considering
questions such as reachability of rules or accessibilty of instance
imported by levelled imported.

This patch removes another place in the compiler where transitive
dependency is calculated in an ad-hoc manner. In general, the transitive
dependency calculation should be cached and computed using a ModuleGraph
abstraction.

The transitive dependency query required by getLinkDeps operates on a
graph without hs-boot nodes. If a linkable from a module in a loop is
needed, then all modules in the loop are necessary to be available to
execute that module. Therefore there is a query in `ModuleGraph` and
`ExternalModuleGraph` which allows a transitive closure query to be
performed on a graph without loops.

Fixes #25634

-------------------------
Metric Decrease:
    MultiLayerModulesTH_Make
    MultiLayerModulesTH_OneShot
Metric Increase:
    mhu-perf
-------------------------

Co-authored-by: Rodrigo Mesquita <rodrigo.m.mesquita at gmail.com>

- - - - -
0d161a57 by Cheng Shao at 2025-01-20T08:32:27-05:00
hie: fix hie.yaml to use default hie-bios script

!13778 accidentally changed hie.yaml to use hie-bios.bat as the
default hie-bios script, which completely breaks hie support on
non-Windows platforms. This patch reverts that change.

- - - - -


30 changed files:

- compiler/GHC/Cmm/Config.hs
- compiler/GHC/Cmm/MachOp.hs
- compiler/GHC/Cmm/Opt.hs
- compiler/GHC/Cmm/Pipeline.hs
- compiler/GHC/Cmm/Sink.hs
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/Config/Cmm.hs
- compiler/GHC/Driver/Errors/Ppr.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/MakeFile.hs
- compiler/GHC/Iface/Load.hs
- compiler/GHC/Linker/Deps.hs
- compiler/GHC/Linker/Loader.hs
- compiler/GHC/StgToCmm/Prim.hs
- compiler/GHC/Unit/External.hs
- + compiler/GHC/Unit/Module/External/Graph.hs
- compiler/GHC/Unit/Module/Graph.hs
- + compiler/GHC/Unit/Module/ModNodeKey.hs
- compiler/ghc.cabal.in
- hie.yaml
- testsuite/tests/backpack/reexport/bkpreex02.stderr
- testsuite/tests/backpack/reexport/bkpreex03.stdout
- testsuite/tests/backpack/should_compile/bkp09.stderr
- testsuite/tests/backpack/should_compile/bkp14.stderr
- testsuite/tests/backpack/should_compile/bkp15.stderr
- testsuite/tests/backpack/should_compile/bkp31.stderr
- testsuite/tests/backpack/should_compile/bkp32.stderr
- testsuite/tests/backpack/should_compile/bkp47.stderr
- testsuite/tests/backpack/should_compile/bkp51.stderr


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/014b619f9d23c7911845a908763d8388a018d690...0d161a577fd9116ea029cebf4ef60af28f98b508

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/014b619f9d23c7911845a908763d8388a018d690...0d161a577fd9116ea029cebf4ef60af28f98b508
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/20250120/98586b3c/attachment-0001.html>


More information about the ghc-commits mailing list