summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Use fix-sized equality primops for fixed size boxed types"wip/revert-bit-twiddlesBen Gamari2023-02-062-12/+12
| | | | | | | | | | This reverts commit 024020c38126f3ce326ff56906d53525bc71690c. This was never applied to master/9.6 originally. See #20405 for why using these primops is a bad idea. (cherry picked from commit b1d109ad542e4c37ae5af6ace71baf2cb509d865)
* gitlab-ci: Eliminate redundant ghc --info outputBen Gamari2023-02-031-2/+5
| | | | | | | Previously ci.sh would emit the output of `ghc --info` every time it ran when using the nix toolchain. This produced a significant amount of noise. See #22861.
* Bump submodule containers to 0.6.7Bodigrim2023-02-031-0/+0
| | | | | | | | | | | | | | | | Metric Decrease: ManyConstructors T10421 T12425 T12707 T13035 T13379 T15164 T1969 T783 T9198 T9961 WWRec
* base: Fix Note references in GHC.IO.Handle.TypesBen Gamari2023-02-031-12/+12
|
* Move pthread and timerfd ticker implementations to separate filesWander Hillen2023-02-033-108/+297
|
* Enable tables next to code for LoongArch64lrzlin2023-02-034-3/+35
|
* Disable unfolding sharing for interface files with core definitionsMatthew Pickering2023-02-0210-4/+56
| | | | | | | | | | | | | | | | | | | | | | Ticket #22807 pointed out that the RHS sharing was not compatible with -fignore-interface-pragmas because the flag would remove unfoldings from identifiers before the `extra-decls` field was populated. For the 9.6 timescale the only solution is to disable this sharing, which will make interface files bigger but this is acceptable for the first release of `-fwrite-if-simplified-core`. For 9.8 it would be good to fix this by implementing #20056 due to the large number of other bugs that would fix. I also improved the error message in tc_iface_binding to avoid the "no match in record selector" error but it should never happen now as the entire sharing logic is disabled. Also added the currently broken test for #22807 which could be fixed by !6080 Fixes #22807
* docs: 9.6 release notes for wasm backendCheng Shao2023-02-021-0/+16
|
* CI: JavaScript backend runs testsuitedoyougnu2023-02-0230-34/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This MR runs the testsuite for the JS backend. Note that this is a temporary solution until !9515 is merged. Key point: The CI runs hadrian on the built cross compiler _but not_ on the bindist. Other Highlights: - stm submodule gets a bump to mark tests as broken - several tests are marked as broken or are fixed by adding more - conditions to their test runner instance. List of working commit messages: CI: test cross target _and_ emulator CI: JS: Try run testsuite with hadrian JS.CI: cleanup and simplify hadrian invocation use single bracket, print info JS CI: remove call to test_compiler from hadrian don't build haddock JS: mark more tests as broken Tracked in https://gitlab.haskell.org/ghc/ghc/-/issues/22576 JS testsuite: don't skip sum_mod test Its expected to fail, yet we skipped it which automatically makes it succeed leading to an unexpected success, JS testsuite: don't mark T12035j as skip leads to an unexpected pass JS testsuite: remove broken on T14075 leads to unexpected pass JS testsuite: mark more tests as broken JS testsuite: mark T11760 in base as broken JS testsuite: mark ManyUnbSums broken submodules: bump process and hpc for JS tests Both submodules has needed tests skipped or marked broken for th JS backend. This commit now adds these changes to GHC. See: HPC: https://gitlab.haskell.org/hpc/hpc/-/merge_requests/21 Process: https://github.com/haskell/process/pull/268 remove js_broken on now passing tests separate wasm and js backend ci test: T11760: add threaded, non-moving only_ways test: T10296a add req_c T13894: skip for JS backend tests: jspace, T22333: mark as js_broken(22573) test: T22513i mark as req_th stm submodule: mark stm055, T16707 broken for JS tests: js_broken(22374) on unpack_sums_6, T12010 dont run diff on JS CI, cleanup fixup: More CI cleanup fix: align text to master fix: align exceptions submodule to master CI: Bump DOCKER_REV Bump to ci-images commit that has a deb11 build with node. Required for !9552 testsuite: mark T22669 as js_skip See #22669 This test tests that .o-boot files aren't created when run in using the interpreter backend. Thus this is not relevant for the JS backend. testsuite: mark T22671 as broken on JS See #22835 base.testsuite: mark Chan002 fragile for JS see #22836 revert: submodule process bump bump stm submodule New hash includes skips for the JS backend. testsuite: mark RnPatternSynonymFail broken on JS Requires TH: - see !9779 - and #22261 compiler: GHC.hs ifdef import Utils.Panic.Plain
* compiler: Implement higher order patterns in the rule matcherJaro Reinders2023-02-027-17/+304
| | | | | | | | This implements proposal 555 and closes ticket #22465. See the proposal and ticket for motivation. The core changes of this patch are in the GHC.Core.Rules.match function and they are explained in the Note [Matching higher order patterns].
* doc: fix gcdetails_block_fragmentation_bytes since annotationTeo Camarasu2023-02-011-1/+2
|
* Remove tracing OPTIONS_GHCMatthew Pickering2023-02-011-1/+0
| | | | These were accidentally left over from !9542
* Bump DOCKER_REV to use alpine image without LLVM installedMatthew Pickering2023-02-011-1/+1
| | | | | alpine_3_12 only supports LLVM 10, which is now outside the supported version range.
* Bump supported LLVM range from 10 through 15 to 11 through 16Matthew Pickering2023-02-012-5/+5
| | | | | | | | | | | | | | LLVM 15 turns on the new pass manager by default, which we have yet to migrate to so for new we pass the `-enable-new-pm-0` flag in our llvm-passes flag. LLVM 11 was the first version to support the `-enable-new-pm` flag so we bump the lowest supported version to 11. Our CI jobs are using LLVM 12 so they should continue to work despite this bump to the lower bound. Fixes #21936
* Treat existentials correctly in dubiousDataConInstArgTysSimon Peyton Jones2023-02-013-9/+33
| | | | | | | | | | | | | Consider (#22849) data T a where MkT :: forall k (t::k->*) (ix::k). t ix -> T @k a Then dubiousDataConInstArgTys MkT [Type, Foo] should return [Foo (ix::Type)] NOT [Foo (ix::k)] A bit of an obscure case, but it's an outright bug, and the fix is easy.
* Improve treatment of type applications in patternswip/T19847Simon Peyton Jones2023-02-0111-105/+411
| | | | | | | | | | This patch fixes a subtle bug in the typechecking of type applications in patterns, e.g. f (MkT @Int @a x y) = ... See Note [Type applications in patterns] in GHC.Tc.Gen.Pat. This fixes #19847, #22383, #19577, #21501
* compiler: properly handle non-word-sized CmmSwitch scrutinees in the wasm NCGwip/T21776Cheng Shao2023-01-315-1/+49
| | | | | | | | Currently, the wasm NCG has an implicit assumption: all CmmSwitch scrutinees are 32-bit integers. This is not always true; #22864 is one counter-example with a 64-bit scrutinee. This patch fixes the logic by explicitly converting the scrutinee to a word that can be used as a br_table operand. Fixes #22871. Also includes a regression test.
* Bump transformers submodule to 0.6.0.6Ben Gamari2023-01-311-0/+0
| | | | Fixes #22862.
* hadrian: Substitute LIBRARY_*_VERSION variablesBen Gamari2023-01-312-2/+18
| | | | | | | This teaches Hadrian to substitute the `LIBRARY_*_VERSION` variables in `libraries/prologue.txt`, fixing #22714. Fixes #22714.
* hadrian: Refactor templating logicBen Gamari2023-01-311-61/+90
| | | | | | This refactors Hadrian's autoconf-style templating logic to be explicit about which interpolation variables should be substituted in which files. This clears the way to fix #22714 without incurring rule cycles.
* hadrian: Sphinx docs require templated cabal filesBen Gamari2023-01-311-2/+15
| | | | | | | The package-version discovery logic in `doc/users_guide/package_versions.py` uses packages' cabal files to determine package versions. Teach Sphinx about these dependencies in cases where the cabal files are generated by templates.
* Revert "Hadrian: fix doc generation"Ben Gamari2023-01-312-18/+3
| | | | | | This is too large of a hammer. This reverts commit 5640cb1d84d3cce4ce0a9e90d29b2b20d2b38c2f.
* testsuite: Add regression test for #22798Ben Gamari2023-01-312-0/+376
|
* nativeGen/AArch64: Fix graph-colouring allocatorBen Gamari2023-01-311-1/+10
| | | | | | | | Previously various `Instr` queries used by the graph-colouring allocator failed to handle a few pseudo-instructions. This manifested in compiler panicks while compiling `SHA`, which uses `-fregs-graph`. Fixes #22798.
* nativeGen: Teach graph-colouring allocator that x18 is unusableBen Gamari2023-01-311-4/+2
| | | | | | | | Previously trivColourable for AArch64 claimed that at 18 registers were trivially-colourable. This is incorrect as x18 is reserved by the platform on AArch64/Darwin. See #22798.
* nativeGen/AArch64: Fix debugging outputBen Gamari2023-01-311-10/+68
| | | | | | | Previously various panics would rely on a half-written Show instance, leading to very unhelpful errors. Fix this. See #22798.
* Revert "Cmm Lint: relax SIMD register assignment check"sheaf2023-01-311-14/+1
| | | | | | This reverts commit 3be48877, which weakened a Cmm Lint check involving SIMD vectors. Now that we keep track of the type a global register is used at, we can restore the original stronger check.
* Cmm: track the type of global registerssheaf2023-01-3140-617/+671
| | | | | | | | | | | | This patch tracks the type of Cmm global registers. This is needed in order to lint uses of polymorphic registers, such as SIMD vector registers that can be used both for floating-point and integer values. This changes allows us to refactor VanillaReg to not store VGcPtr, as that information is instead stored in the type of the usage of the register. Fixes #22297
* configure: Always create the VERSION fileBen Gamari2023-01-313-7/+4
| | | | | | | | Teach the `configure` script to create the `VERSION` file. This will serve as the stable interface to allow the user to determine the version number of a working tree. Fixes #22322.
* Support "unusable UNPACK pragma" warning with -O0Krzysztof Gogolewski2023-01-3110-31/+71
| | | | Fixes #11270
* Improve exprOkForSpeculation for classopsSimon Peyton Jones2023-01-3121-80/+228
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes #22745 and #15205, which are about GHC's failure to discard unnecessary superclass selections that yield coercions. See GHC.Core.Utils Note [exprOkForSpeculation and type classes] The main changes are: * Write new Note [NON-BOTTOM_DICTS invariant] in GHC.Core, and refer to it * Define new function isTerminatingType, to identify those guaranteed-terminating dictionary types. * exprOkForSpeculation has a new (very simple) case for ClassOpId * ClassOpId has a new field that says if the return type is an unlifted type, or a terminating type. This was surprisingly tricky to get right. In particular note that unlifted types are not terminating types; you can write an expression of unlifted type, that diverges. Not so for dictionaries (or, more precisely, for the dictionaries that GHC constructs). Metric Decrease: LargeRecord
* FastString: add fastStringToShorTextdoyougnu2023-01-312-19/+23
|
* InfoTableProv: ShortText --> ShortByteStringdoyougnu2023-01-311-17/+20
|
* testsuite: use tgamma for cg007Cheng Shao2023-01-311-3/+2
| | | | | | gamma is a glibc-only deprecated function, use tgamma instead. It's required for fixing cg007 when testing the wasm unregisterised codegen.
* Update note at beginning of GHC.Builtin.NAmesJoachim Breitner2023-01-311-7/+9
| | | | some things have been renamed since it was written, it seems.
* rts: prevent potential divide-by-zero when tickInterval=0Cheng Shao2023-01-311-4/+5
| | | | | | This patch fixes a few places in RtsFlags.c that may result in divide-by-zero error when tickInterval=0, which is the default on wasm. Fixes #22603.
* Fixes for cabal-reinstall CI jobMatthew Pickering2023-01-318-23/+24
| | | | | | | | * Allow filepath to be reinstalled * Bump some version bounds to allow newer versions of libraries * Rework testing logic to avoid "install --lib" and package env files Fixes #22344
* User's guide: Clarify overlapping instance candidate eliminationJason Shipman2023-01-301-2/+2
| | | | | | | | | | | | This commit updates the user's guide section on overlapping instance candidate elimination to use "or" verbiage instead of "either/or" in regards to the current pair of candidates' being overlappable or overlapping. "Either IX is overlappable, or IY is overlapping" can cause confusion as it suggests "Either IX is overlappable, or IY is overlapping, but not both". This was initially discussed on this Discourse topic: https://discourse.haskell.org/t/clarification-on-overlapping-instance-candidate-elimination/5677
* gen_ci: Only consider release jobs for job metadataMatthew Pickering2023-01-302-4/+3
| | | | | In particular we do not have a release job for FreeBSD so the generation of the platform mapping was failing.
* rel_eng: Fix the name of the ubuntu-* jobsMatthew Pickering2023-01-301-2/+2
| | | | | | These were not uploaded for alpha1 Fixes #22844
* rel_eng: Add check to make sure that release jobs are downloaded by fetch-gitlabMatthew Pickering2023-01-301-0/+10
| | | | | | This check makes sure that if a job is a prefixed by "release-" then the script downloads it and understands how to map the job name to the platform.
* ci: Remove FreeBSD job from release pipelinesMatthew Pickering2023-01-302-63/+1
| | | | We no longer attempt to build or distribute this release
* Take account of loop breakers in specLookupRuleSimon Peyton Jones2023-01-3011-49/+90
| | | | | | | | | | | | | | | | | | | | The key change is that in GHC.Core.Opt.Specialise.specLookupRule we were using realIdUnfolding, which ignores the loop-breaker flag. When given a loop breaker, rule matching therefore looped infinitely -- #22802. In fixing this I refactored a bit. * Define GHC.Core.InScopeEnv as a data type, and use it. (Previously it was a pair: hard to grep for.) * Put several functions returning an IdUnfoldingFun into GHC.Types.Id, namely idUnfolding alwaysActiveUnfoldingFun, whenActiveUnfoldingFun, noUnfoldingFun and use them. (The are all loop-breaker aware.)
* Fix two bugs in TypeData TH reificationRyan Scott2023-01-306-6/+58
| | | | | | | | | | | This patch fixes two issues in the way that `type data` declarations were reified with Template Haskell: * `type data` data constructors are now properly reified using `DataConI`. This is accomplished with a special case in `reifyTyCon`. Fixes #22818. * `type data` type constructors are now reified in `reifyTyCon` using `TypeDataD` instead of `DataD`. Fixes #22819.
* Handle `type data` properly in tyThingParent_maybeRyan Scott2023-01-306-8/+42
| | | | | | | | | | | | Unlike most other data constructors, data constructors declared with `type data` are represented in `TyThing`s as `ATyCon` rather than `ADataCon`. The `ATyCon` case in `tyThingParent_maybe` previously did not consider the possibility of the underlying `TyCon` being a promoted data constructor, which led to the oddities observed in #22817. This patch adds a dedicated special case in `tyThingParent_maybe`'s `ATyCon` case for `type data` data constructors to fix these oddities. Fixes #22817.
* ghc-the-library: Retain cafs in both static in dynamic builds.Andreas Klebinger2023-01-303-4/+42
| | | | | | | | | | | | | | | | | | | | | We use keepCAFsForGHCi.c to force -fkeep-cafs behaviour by using a __attribute__((constructor)) function. This broke for static builds where the linker discarded the object file since it was not reverenced from any exported code. We fix this by asserting that the flag is enabled using a function in the same module as the constructor. Which causes the object file to be retained by the linker, which in turn causes the constructor the be run in static builds. This changes nothing for dynamic builds using the ghc library. But causes static to also retain CAFs (as we expect them to). Fixes #22417. ------------------------- Metric Decrease: T21839r -------------------------
* compiler: fix data section alignment in the wasm NCGCheng Shao2023-01-301-10/+10
| | | | | | | | | | | | | Previously we tried to lower the alignment requirement as far as possible, based on the section kind inferred from the CLabel. For info tables, .p2align 1 was applied given the GC should only need the lowest bit to tag forwarding pointers. But this would lead to unaligned loads/stores, which has a performance penalty even if the wasm spec permits it. Furthermore, the test suite has shown memory corruption in a few cases when compacting gc is used. This patch takes a more conservative approach: all data sections except C strings align to word size.
* nativeGen: Disable asm-shortcutting on DarwinBen Gamari2023-01-302-2/+19
| | | | | | | | | | | | | Asm-shortcutting may produce relative references to symbols defined in other compilation units. This is not something that MachO relocations support (see #21972). For this reason we disable the optimisation on Darwin. We do so without a warning since this flag is enabled by `-O2`. Another way to address this issue would be to rather implement a PLT-relocatable jump-table strategy. However, this would only benefit Darwin and does not seem worth the effort. Closes #21972.
* compiler: properly handle ForeignHints in the wasm NCGCheng Shao2023-01-281-13/+52
| | | | | Properly handle ForeignHints of ccall arguments/return value, insert sign extends and truncations when handling signed subwords. Fixes #22852.
* Assorted changes to avoid Data.List.{head,tail}Bodigrim2023-01-2811-31/+32
|