[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 10 commits: cmm: add word <-> double/float bitcast

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Fri May 24 09:30:36 UTC 2024



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


Commits:
9af7d64d by doyougnu at 2024-05-24T05:29:51-04:00
cmm: add word <-> double/float bitcast

- closes: #25331

This is the last step in the project plan described in #25331. This
commit:

- adds bitcast operands for x86_64, LLVM, aarch64
- For PPC and i386 we resort to using the cmm implementations
- renames conversion MachOps from Conv to Round|Truncate

- - - - -
3aa5f332 by Krzysztof Gogolewski at 2024-05-24T05:29:55-04:00
StgToByteCode: minor refactor

Some functions in StgToByteCode were filtering out void arguments.
However, StgToByteCode is called after unarisation: the void arguments
should have been removed earlier.
Instead of filtering out, we assert that the args are non-void.

- - - - -
572d7221 by Krzysztof Gogolewski at 2024-05-24T05:29:55-04:00
StgToByteCode: minor refactor

`layoutNativeCall` was always called with a `primRepCmmType platform`
callback. Hence we can put it inside of `layoutNativeCall` rather than
repeat it.

- - - - -
f7e120d2 by David Binder at 2024-05-24T05:30:03-04:00
haddock: Remove compatibility shims for GHC < 8.4 from haddock-library

- - - - -
234e9fd0 by Cheng Shao at 2024-05-24T05:30:03-04:00
compiler: avoid saving foreign call target to local when there are no caller-save GlobalRegs

This patch makes the STG->Cmm backend avoid saving foreign call target
to local when there are no caller-save GlobalRegs.

Since 321941a8ebe25192cdeece723e1058f2f47809ea, when we lower a
foreign call, we unconditionally save the foreign call target to a
temporary local first, then rely on cmmSink to clean it up later,
which only happens with -fcmm-sink (implied by -O) and not in
unoptimized code.

And this is troublesome for the wasm backend NCG, which needs to infer
a foreign call target symbol's type signature from the Cmm call site.
Previously, the NCG has been emitting incorrect type signatures for
unoptimized code, which happens to work with `wasm-ld` most of the
time, but this is never future-proof against upstream toolchain
updates, and it causes horrible breakages when LTO objects are
included in linker input. Hence this patch.

- - - - -
a1f6a5ca by Cheng Shao at 2024-05-24T05:30:03-04:00
testsuite: add callee-no-local regression test

- - - - -
21b33135 by Sylvain Henry at 2024-05-24T05:30:17-04:00
Fix HasCallStack leftovers from !12514 / #24726

- - - - -
b66970cd by crumbtoo at 2024-05-24T05:30:20-04:00
user_guide: Fix typo in MultiWayIf chapter

Close #24829

- - - - -
89b58919 by Ben Gamari at 2024-05-24T05:30:21-04:00
base: Ensure that CHANGELOG is included in extra-source-files

This was missed in the `ghc-internal` split.

Closes #24831.

- - - - -
55cb9daf by Ben Gamari at 2024-05-24T05:30:21-04:00
base: Fix changelog reference to setBacktraceMechanismState

(cherry picked from commit b63f7ba01fdfd98a01d2f0dec8d9262b3e595c5d)

- - - - -


30 changed files:

- compiler/GHC/Cmm/MachOp.hs
- compiler/GHC/Cmm/Opt.hs
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/AArch64/Instr.hs
- compiler/GHC/CmmToAsm/AArch64/Ppr.hs
- compiler/GHC/CmmToAsm/PPC/CodeGen.hs
- compiler/GHC/CmmToAsm/Wasm/FromCmm.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/CmmToAsm/X86/Instr.hs
- compiler/GHC/CmmToAsm/X86/Ppr.hs
- compiler/GHC/CmmToC.hs
- compiler/GHC/CmmToLlvm/CodeGen.hs
- compiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Driver/Config/StgToCmm.hs
- compiler/GHC/Platform.hs
- compiler/GHC/StgToByteCode.hs
- compiler/GHC/StgToCmm/Config.hs
- compiler/GHC/StgToCmm/Foreign.hs
- compiler/GHC/StgToCmm/Prim.hs
- docs/users_guide/exts/multiway_if.rst
- libraries/base/base.cabal
- libraries/base/changelog.md
- libraries/ghc-platform/src/GHC/Platform/ArchOS.hs
- rts/include/stg/Prim.h
- testsuite/tests/codeGen/should_compile/all.T
- + testsuite/tests/codeGen/should_compile/callee-no-local.hs
- + testsuite/tests/codeGen/should_compile/callee-no-local.stderr
- utils/haddock/haddock-library/haddock-library.cabal
- − utils/haddock/haddock-library/src/CompatPrelude.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/dcd64e4c86a8eda724aed2a3b036d9e53e4c7797...55cb9dafddf739a4074223d4badd58ec9545ec17

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/dcd64e4c86a8eda724aed2a3b036d9e53e4c7797...55cb9dafddf739a4074223d4badd58ec9545ec17
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/20240524/21712784/attachment.html>


More information about the ghc-commits mailing list