[Git][ghc/ghc][wip/andreask/ghc_par] 70 commits: Add SIMD absolute value on x86 and LLVM
Andreas Klebinger pushed to branch wip/andreask/ghc_par at Glasgow Haskell Compiler / GHC Commits: 476c4cdf by Sean D. Gillespie at 2026-03-02T10:14:37-05:00 Add SIMD absolute value on x86 and LLVM On x86, absolute value of 32 bits or less is implemented with PABSB/PABSW/PABSD if SSSE3 is available. Otherwise, there is a fallback for SSE2. For 64 bit integers it uses VPABSQ, required by AVX-512VL, with fallbacks for SSE4.2 and SSE2. There is no dedicated instruction for floating point absolute value on x86, so it is simulated using bitwise AND. Absolute value for signed integers and floats are implemented by the "llvm.abs/llvm.fabs" standard library intrinsics. This implementation uses MachOps constructors, unlike non-vector floating point absolute value, which uses CallishMachOps. - - - - - 709448c0 by Sean D. Gillespie at 2026-03-02T10:14:46-05:00 Add SIMD floating point square root On x86, this is implemented with the SQRTPS and SQRTPD instructions. On LLVM, it uses the sqrt library intrinstic. - - - - - 0deadf66 by Sean D. Gillespie at 2026-03-02T10:14:47-05:00 Improve error message for SIMD on aarch64 When encountering vector literals on aarch64, previously it would throw: <no location info>: error: panic! (the 'impossible' happened) GHC version 9.15.20251219: getRegister' (CmmLit:CmmVec): Now it is more consistent with the other vector operations: <no location info>: error: sorry! (unimplemented feature or known bug) GHC version 9.15.20251219: SIMD operations on AArch64 currently require the LLVM backend - - - - - 7d64031b by Vladislav Zavialov at 2026-03-03T11:09:28-05:00 Replace maybeAddSpace with spaceIfSingleQuote Simplify pretty-printing of HsTypes by using spaceIfSingleQuote. This allows us to drop the unwieldy lhsTypeHasLeadingPromotionQuote helper function. Follow-up to 178c1fd830c78377ef5d338406a41e1d8eb5f0da - - - - - 598db847 by Wolfgang Jeltsch at 2026-03-06T06:25:25-05:00 Correct `hIsReadable` and `hIsWritable` for duplex handles This contribution implements CLC proposal #371. It changes `hIsReadable` and `hIsWritable` such that they always throw a respective exception when encountering a closed or semi-closed handle, not just in the case of a file handle. - - - - - b90201e5 by Wolfgang Jeltsch at 2026-03-06T06:25:25-05:00 Document `SemiClosedHandle` - - - - - c9df72b5 by Wolfgang Jeltsch at 2026-03-06T06:25:25-05:00 Tell users what “semi-closed” means for duplex handles - - - - - a8aa1868 by Ilias Tsitsimpis at 2026-03-06T06:26:29-05:00 Fix determinism of linker arguments The switch from Data.Map to UniqMap in 3b5be05ac29 introduced non-determinism in the order of packages passed to the linker. This resulted in non-reproducible builds where the DT_NEEDED entries in dynamic libraries were ordered differently across builds. Fix the regression by explicitly sorting the package list derived from UniqMap. Fixes #26838 - - - - - 9b64ad3a by Matthew Pickering at 2026-03-06T06:27:16-05:00 determinism: Use a deterministic renaming when writing bytecode files Now when writing the bytecode file, a counter and substitution are used to provide deterministic keys to local variables (rather than relying on uniques). This change ensures that `.gbc` are produced deterministically. Fixes #26499 - - - - - d29800e0 by Teo Camarasu at 2026-03-06T06:28:46-05:00 ghc-internal: delete Version hs-boot loop Version has a Read instance which needs Unicode but part of the Unicode interface is the unicode version. This is easy to resolve. We simply don't re-export the version from the Unicode module. Resolves #26940 - - - - - ad25af90 by Sylvain Henry at 2026-03-06T06:30:33-05:00 Linker: implement support for COMMON symbols (#6107) Add some support for COMMON symbols. We don't support common symbols having different sizes where the larger one is allocated after the smaller one. The linker will fail with an appropriate error message if it happens. - - - - - 3b59f158 by Cheng Shao at 2026-03-06T06:31:16-05:00 compiler: fix redundant import of GHC.Hs.Lit This patch removes a redundant import of `GHC.Hs.Lit` which causes a ghc build failure with validate flavours when bootstrapping from 9.14. Fixes #26972. - - - - - 148d36f3 by Cheng Shao at 2026-03-06T06:32:01-05:00 compiler: avoid unneeded traversals in GHC.Unit.State Following !15591, this patch avoids unneeded traversals in `reportCycles`/`reportUnusable` when log verbosity is below given threshold. Also applies `logVerbAtLeast` when appropriate. Co-authored-by: Codex <codex@openai.com> - - - - - 7e31367c by Cheng Shao at 2026-03-06T06:32:46-05:00 ghc-internal: fix redundant import in GHC.Internal.Event.Windows.ManagedThreadPool This patch fixes redundant import in `GHC.Internal.Event.Windows.ManagedThreadPool` that causes a compilation error when building windows target with validate flavours and bootstrapping from 9.14. Fixes #26976. - - - - - fc8b8e27 by sheaf at 2026-03-06T06:33:28-05:00 System.Info.fullCompilerVersion: add 'since' annot Fixes #26973 - - - - - c8238375 by Sylvain Henry at 2026-03-06T06:34:23-05:00 Hadrian: deprecate --bignum and automatically enable +native_bignum for JS Deprecate --bignum=... to select the bignum backend. It's only used to select the native backend, and this can be done with the +native_bignum flavour transformer. Additionally, we automatically enable +native_bignum for the JS target because the GMP backend isn't supported. - - - - - a3ac7074 by Sylvain Henry at 2026-03-06T06:35:17-05:00 JS: fix putEnum/fromEnum (#24593) Don't go through Word16 when serializing Enums. - - - - - 0b36e96c by Andreas Klebinger at 2026-03-06T06:35:58-05:00 Docs: Document -fworker-wrapper-cbv default setting. Fixes #26841 - - - - - eca445e7 by mangoiv at 2026-03-07T05:02:36-05:00 drop deb9/10 from CI, add deb13 debian 9 and 10 are end of life, hence we drop them from our CI, but we do add debian 13. Jobs that were previously run on 9 and 10 run on 13, too, jobs that were run on 10, are run on 11 now. Jobs that were previously run on debian 12 are run on debian 13 now. This MR also updates hadrian's bootstrap plans for that reason. Metric Decrease: T9872d - - - - - 12f8b829 by Luite Stegeman at 2026-03-07T05:03:33-05:00 Fix GHC.Internal.Prim haddock Haddock used to parse Haskell source to generate documentation, but switched to using interface files instead. This broke documentation of the GHC.Internal.Prim module, since it's a wired-in interface that didn't provide a document structure. This patch adds the missing document structure and updates genprimopcode to make the section headers and descriptions available. fixes #26954 - - - - - f87e5e57 by Luite Stegeman at 2026-03-07T05:03:33-05:00 Remove obsolete --make-haskell-source from genprimopcode Now that haddock uses the wired-in interface for GHC.Internal.Prim, the generated Haskell source file is no longer needed. Remove the --make-haskell-source code generator from genprimopcode and replace the generated GHC/Internal/Prim.hs with a minimal static source file. - - - - - 4a7ddc7b by Sylvain Henry at 2026-03-07T05:04:59-05:00 JS: fix linking of exposed but non-preload units (#24886) Units exposed in the unit database but not explicitly passed on the command-line were not considered by the JS linker. This isn't an issue for cabal which passes every unit explicitly but it is an issue when using GHC directly (cf T24886 test). - - - - - 689aafcd by mangoiv at 2026-03-07T05:05:52-05:00 testsuite: double foundation timeout multiplier The runtime timeout in the foundation test was regularly hit by code generated by the wasm backend - we increase the timout since the high runtime is expected on the wasm backend for this rather complex test. Resolves #26938 - - - - - f41ff125 by Andreas Klebinger at 2026-03-08T20:46:15+00:00 core: add CoreCompUnit newtype - - - - - 1069971e by Andreas Klebinger at 2026-03-08T20:46:15+00:00 Thread CompilationUnit through compiler. Instead of a CoreProgram being a list of types it's now a list of compilation units which can be compiled independently. - - - - - 1a39613e by Andreas Klebinger at 2026-03-08T20:46:15+00:00 Put local rules into compilation unit - - - - - 7a54d5a9 by Andreas Klebinger at 2026-03-08T20:46:15+00:00 Needs checking: Combine compilation units When compiling compilation units we must ensure the uniques of top level functions don't clash. We do so by substituting over them. - - - - - 81aeb179 by Andreas Klebinger at 2026-03-08T20:46:15+00:00 Maybe deal with glomming - - - - - 968fddc2 by Andreas Klebinger at 2026-03-08T20:46:15+00:00 Simplify deshadowBinds and make it operate only on binds. - - - - - f7a07729 by Andreas Klebinger at 2026-03-08T20:46:15+00:00 Add splitting pass, fix some printing stuff - - - - - 6d55d9b2 by Andreas Klebinger at 2026-03-08T20:46:15+00:00 Merge/Split core around CSE - - - - - a22dc75f by Andreas Klebinger at 2026-03-08T20:46:15+00:00 Enable split core by default - - - - - 9ef65916 by Andreas Klebinger at 2026-03-08T20:46:15+00:00 More simple plugin test failures - - - - - 88a4166e by Andreas Klebinger at 2026-03-08T20:46:15+00:00 Better flattening, we should now retain rules - - - - - d3645d58 by Andreas Klebinger at 2026-03-08T20:46:15+00:00 Take apart ModGuts for simplifier. - - - - - 2f324822 by Andreas Klebinger at 2026-03-08T20:46:15+00:00 Don't output compilation unit header if there is only a singly unit - - - - - 7557d0ae by Andreas Klebinger at 2026-03-08T20:46:16+00:00 suppress unit marker for single unit - - - - - 60cc0cb7 by Andreas Klebinger at 2026-03-08T20:46:16+00:00 Place local-relevant rules in compilation unit - - - - - e40644d3 by Andreas Klebinger at 2026-03-08T20:46:16+00:00 Fix rule assignment to comp units during occAnalSplit - - - - - 78e28598 by Andreas Klebinger at 2026-03-08T20:46:16+00:00 Dead code analysis now respects unit rules. - - - - - 9dd7360a by Andreas Klebinger at 2026-03-08T20:46:16+00:00 [Slop] Testsuite: Detect errors that only consist of output reordering - - - - - 8180a503 by Andreas Klebinger at 2026-03-08T20:46:16+00:00 Don't pass full ModGuts to Specialise - - - - - f4b81743 by Andreas Klebinger at 2026-03-08T20:46:16+00:00 FloatOut: Use list of binds rather than CoreProgram - - - - - e99cf96e by Andreas Klebinger at 2026-03-08T20:46:16+00:00 Include unit rules in simplifier rules env during interations - - - - - 20ebc186 by Andreas Klebinger at 2026-03-08T20:46:16+00:00 HACK: Always run occAnal after merge to clear up letrecs - - - - - 817c7fe0 by Andreas Klebinger at 2026-03-08T20:46:16+00:00 Lint: Better check for CompUnit invariants - - - - - bb7d2545 by Andreas Klebinger at 2026-03-08T20:46:16+00:00 Do unit/guts split for specialise - - - - - e030e234 by Andreas Klebinger at 2026-03-08T20:46:16+00:00 Fiddle with dumps - - - - - c95587d2 by Andreas Klebinger at 2026-03-08T20:46:16+00:00 Some fixes to specialise. It now processes units one at a time. - - - - - 64dfbe8d by Andreas Klebinger at 2026-03-08T20:46:16+00:00 Use all fvs of rules as edges when splitting - - - - - 5290e4ee by Andreas Klebinger at 2026-03-08T20:46:16+00:00 Handle rules which stop refering to local binders - - - - - 26081203 by Andreas Klebinger at 2026-03-08T20:46:16+00:00 Refactored splitting. Broke it into parts to make it easier to understand. - - - - - d5f94558 by Andreas Klebinger at 2026-03-08T20:46:16+00:00 Make sure CoreMerge reattaches unstable unfoldings - - - - - 169bb1bc by Andreas Klebinger at 2026-03-08T20:46:16+00:00 testsuite: Ignore compilation unit header in output comparison - - - - - e61ea11e by Andreas Klebinger at 2026-03-08T20:46:16+00:00 Some useless checks - - - - - b7d21061 by Andreas Klebinger at 2026-03-08T20:46:16+00:00 Possible fixes to simplifier/specConstr from the bot - - - - - e7f43bf9 by Andreas Klebinger at 2026-03-08T20:46:16+00:00 merge/split around late cse - - - - - 312195a1 by Andreas Klebinger at 2026-03-08T20:46:16+00:00 Make CSE work independently over compilation units - - - - - d3941fe3 by Andreas Klebinger at 2026-03-08T20:46:16+00:00 Keep rules attributed to units in the simplifier - - - - - 096254a9 by Andreas Klebinger at 2026-03-08T20:46:16+00:00 Some vibe based fixes - - - - - 6b71cac7 by Andreas Klebinger at 2026-03-08T20:46:16+00:00 Fix an issue with dependency analysis with boot files - - - - - 7aecf8f3 by Andreas Klebinger at 2026-03-08T22:45:49+00:00 Don't split if module has a boot file to avoid expensive dep analysis. - - - - - fe27f5b3 by Andreas Klebinger at 2026-03-08T23:23:01+00:00 Allow split cse with -fsplit-cse - - - - - d2a79687 by Andreas Klebinger at 2026-03-08T23:28:25+00:00 Dubious: Stop looking at imported unfoldings - - - - - 15a8a1ca by Andreas Klebinger at 2026-03-08T23:58:28+00:00 Increase unit independent processing - - - - - 7810af67 by Andreas Klebinger at 2026-03-09T00:10:22+00:00 AI tuning of Split.hs - - - - - 33ec5869 by Andreas Klebinger at 2026-03-09T00:19:45+00:00 Do some stuff in parallel - - - - - 8d7e76b6 by Andreas Klebinger at 2026-03-09T00:40:02+00:00 par WW - - - - - e62e43fe by Andreas Klebinger at 2026-03-09T01:25:13+00:00 Make simp more per unit - - - - - a1fc3262 by Andreas Klebinger at 2026-03-09T01:37:57+00:00 Make things parallel - - - - - 168 changed files: - .gitlab-ci.yml - .gitlab/generate-ci/gen_ci.hs - .gitlab/jobs.yaml - .gitlab/rel_eng/fetch-gitlab-artifacts/fetch_gitlab.py - .gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py - compiler/GHC.hs - compiler/GHC/Builtin/PrimOps.hs - compiler/GHC/Builtin/Utils.hs - compiler/GHC/Builtin/primops.txt.pp - compiler/GHC/ByteCode/Serialize.hs - compiler/GHC/Cmm/MachOp.hs - compiler/GHC/CmmToAsm/AArch64/CodeGen.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.hs - compiler/GHC/Core.hs-boot - + compiler/GHC/Core/FVs.hs-boot - compiler/GHC/Core/LateCC.hs - compiler/GHC/Core/LateCC/Utils.hs - compiler/GHC/Core/Lint.hs - compiler/GHC/Core/Opt/CSE.hs - compiler/GHC/Core/Opt/CallArity.hs - compiler/GHC/Core/Opt/CallerCC.hs - + compiler/GHC/Core/Opt/CompUnit.hs - compiler/GHC/Core/Opt/CprAnal.hs - compiler/GHC/Core/Opt/DmdAnal.hs - compiler/GHC/Core/Opt/Exitify.hs - compiler/GHC/Core/Opt/FloatIn.hs - compiler/GHC/Core/Opt/FloatOut.hs - compiler/GHC/Core/Opt/LiberateCase.hs - compiler/GHC/Core/Opt/Monad.hs - compiler/GHC/Core/Opt/OccurAnal.hs - + compiler/GHC/Core/Opt/OccurAnal.hs-boot - compiler/GHC/Core/Opt/Pipeline.hs - compiler/GHC/Core/Opt/Pipeline/Types.hs - compiler/GHC/Core/Opt/SetLevels.hs - compiler/GHC/Core/Opt/Simplify.hs - compiler/GHC/Core/Opt/SpecConstr.hs - compiler/GHC/Core/Opt/Specialise.hs - + compiler/GHC/Core/Opt/Split.hs - compiler/GHC/Core/Opt/StaticArgs.hs - compiler/GHC/Core/Opt/WorkWrap.hs - compiler/GHC/Core/Ppr.hs - compiler/GHC/Core/Rules.hs - compiler/GHC/Core/SimpleOpt.hs - compiler/GHC/Core/Subst.hs - + compiler/GHC/Core/Subst.hs-boot - compiler/GHC/Core/Utils.hs - compiler/GHC/CoreToStg.hs - compiler/GHC/CoreToStg/AddImplicitBinds.hs - compiler/GHC/CoreToStg/Prep.hs - compiler/GHC/Driver/Config/Core/Lint.hs - compiler/GHC/Driver/DynFlags.hs - compiler/GHC/Driver/Flags.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/Hs/Type.hs - compiler/GHC/HsToCore.hs - compiler/GHC/HsToCore/Monad.hs - compiler/GHC/Iface/Make.hs - compiler/GHC/Iface/Tidy.hs - compiler/GHC/Iface/Tidy/StaticPtrTable.hs - compiler/GHC/Runtime/Interpreter/JS.hs - compiler/GHC/StgToCmm/Prim.hs - compiler/GHC/StgToJS/Object.hs - compiler/GHC/StgToJS/Prim.hs - compiler/GHC/Unit/State.hs - compiler/GHC/Utils/Error.hs - compiler/ghc.cabal.in - docs/users_guide/using-optimisation.rst - hadrian/README.md - hadrian/bootstrap/generate_bootstrap_plans - hadrian/bootstrap/plan-9_10_1.json - hadrian/bootstrap/plan-9_10_2.json - + hadrian/bootstrap/plan-9_10_3.json - hadrian/bootstrap/plan-bootstrap-9_10_1.json - hadrian/bootstrap/plan-bootstrap-9_10_2.json - + hadrian/bootstrap/plan-bootstrap-9_10_3.json - hadrian/src/CommandLine.hs - hadrian/src/Main.hs - hadrian/src/Rules/Generate.hs - hadrian/src/Settings.hs - hadrian/src/Settings/Builders/GenPrimopCode.hs - libraries/base/changelog.md - libraries/base/src/GHC/Base.hs - libraries/base/src/GHC/Exts.hs - libraries/base/src/GHC/Unicode.hs - libraries/base/src/System/Info.hs - libraries/ghc-experimental/CHANGELOG.md - libraries/ghc-internal/ghc-internal.cabal.in - − libraries/ghc-internal/src/GHC/Internal/Data/Version.hs-boot - libraries/ghc-internal/src/GHC/Internal/Event/Windows/ManagedThreadPool.hs - libraries/ghc-internal/src/GHC/Internal/IO/Handle.hs - libraries/ghc-internal/src/GHC/Internal/IO/Handle/Text.hs - libraries/ghc-internal/src/GHC/Internal/IO/Handle/Types.hs - + libraries/ghc-internal/src/GHC/Internal/Prim.hs - libraries/ghc-internal/src/GHC/Internal/Unicode.hs - libraries/ghc-internal/src/GHC/Internal/Unicode/Version.hs - libraries/ghc-internal/tools/ucd2haskell/exe/UCD2Haskell/ModuleGenerators.hs - rts/Linker.c - rts/LinkerInternals.h - rts/linker/Elf.c - rts/linker/MachO.c - rts/linker/PEi386.c - testsuite/driver/junit.py - testsuite/driver/perf_notes.py - testsuite/driver/runtests.py - testsuite/driver/testglobals.py - testsuite/driver/testlib.py - testsuite/tests/ghci/should_run/all.T - testsuite/tests/interface-stability/ghc-experimental-exports.stdout - testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32 - testsuite/tests/interface-stability/ghc-prim-exports.stdout - testsuite/tests/interface-stability/ghc-prim-exports.stdout-mingw32 - + testsuite/tests/javascript/T24886.hs - + testsuite/tests/javascript/T24886.stderr - + testsuite/tests/javascript/T24886.stdout - testsuite/tests/javascript/all.T - testsuite/tests/numeric/should_run/all.T - testsuite/tests/overloadedrecflds/should_compile/all.T - testsuite/tests/overloadedrecflds/should_run/all.T - testsuite/tests/plugins/HomePackagePlugin.hs - testsuite/tests/plugins/all.T - testsuite/tests/plugins/annotation-plugin/SayAnnNames.hs - testsuite/tests/plugins/late-plugin/LatePlugin.hs - testsuite/tests/plugins/simple-plugin/Simple/Plugin.hs - testsuite/tests/plugins/simple-plugin/Simple/ReplacePlugin.hs - testsuite/tests/pmcheck/should_compile/T11303.hs - testsuite/tests/quasiquotation/qq005/test.T - testsuite/tests/quasiquotation/qq006/test.T - testsuite/tests/rts/linker/Makefile - + testsuite/tests/rts/linker/T6107.hs - + testsuite/tests/rts/linker/T6107.stdout - + testsuite/tests/rts/linker/T6107_sym1.s - + testsuite/tests/rts/linker/T6107_sym2.s - testsuite/tests/rts/linker/all.T - testsuite/tests/saks/should_compile/all.T - testsuite/tests/showIface/all.T - testsuite/tests/simd/should_run/doublex2_arith.hs - testsuite/tests/simd/should_run/doublex2_arith.stdout - testsuite/tests/simd/should_run/doublex2_arith_baseline.hs - testsuite/tests/simd/should_run/doublex2_arith_baseline.stdout - testsuite/tests/simd/should_run/floatx4_arith.hs - testsuite/tests/simd/should_run/floatx4_arith.stdout - testsuite/tests/simd/should_run/floatx4_arith_baseline.hs - testsuite/tests/simd/should_run/floatx4_arith_baseline.stdout - testsuite/tests/simd/should_run/int16x8_arith.hs - testsuite/tests/simd/should_run/int16x8_arith.stdout - testsuite/tests/simd/should_run/int16x8_arith_baseline.hs - testsuite/tests/simd/should_run/int16x8_arith_baseline.stdout - testsuite/tests/simd/should_run/int32x4_arith.hs - testsuite/tests/simd/should_run/int32x4_arith.stdout - testsuite/tests/simd/should_run/int32x4_arith_baseline.hs - testsuite/tests/simd/should_run/int32x4_arith_baseline.stdout - testsuite/tests/simd/should_run/int64x2_arith.hs - testsuite/tests/simd/should_run/int64x2_arith.stdout - testsuite/tests/simd/should_run/int64x2_arith_baseline.hs - testsuite/tests/simd/should_run/int64x2_arith_baseline.stdout - testsuite/tests/simd/should_run/int8x16_arith.hs - testsuite/tests/simd/should_run/int8x16_arith.stdout - testsuite/tests/simd/should_run/int8x16_arith_baseline.hs - testsuite/tests/simd/should_run/int8x16_arith_baseline.stdout - testsuite/tests/th/all.T - testsuite/tests/vdq-rta/should_compile/all.T - utils/genprimopcode/Main.hs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ec5be4425b0ee8c19f4a817d36236bd... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ec5be4425b0ee8c19f4a817d36236bd... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Andreas Klebinger (@AndreasK)