summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gitlab-ci: Bump ci-imageswip/adamse/9.2-ci-fixesBen Gamari2021-06-191-1/+1
| | | | (cherry picked from commit 2a7e29e5303058473484b10ed57d3c579d78fe83)
* [testsuite] fix T6132 when using the LLVM toolchainwip/angerman/ghc-9.2-aarch64Moritz Angermann2021-06-081-1/+7
| | | | (cherry picked from commit ecc3a405bb961cf45a4eaef36991a07321989474)
* [testsuite] fix T13702 with clangMoritz Angermann2021-06-081-0/+5
| | | | (cherry picked from commit 4db2d44ccbd0b615f41487bae082d1d14d37ecce)
* [ci] force CC=clang for aarch64-linuxMoritz Angermann2021-06-081-0/+1
| | | | (cherry picked from commit a1fed3a51b9216ad072a0d57e32a0eaab44f9476)
* [ci] no docs for aarch64-linux-llvmMoritz Angermann2021-06-081-0/+7
| | | | (cherry picked from commit 1b2f894f47c54c6e921931351eba36842c345caf)
* [ci] -llvm with --way=llvmMoritz Angermann2021-06-081-0/+2
| | | | (cherry picked from commit db1e07f13a7ec6cde2918c435fa422062c49f536)
* Adds AArch64 Native Code GeneratorMoritz Angermann2021-06-0848-142/+3606
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In which we add a new code generator to the Glasgow Haskell Compiler. This codegen supports ELF and Mach-O targets, thus covering Linux, macOS, and BSDs in principle. It was tested only on macOS and Linux. The NCG follows a similar structure as the other native code generators we already have, and should therfore be realtively easy to follow. It supports most of the features required for a proper native code generator, but does not claim to be perfect or fully optimised. There are still opportunities for optimisations. Metric Decrease: ManyAlternatives ManyConstructors MultiLayerModules PmSeriesG PmSeriesS PmSeriesT PmSeriesV T10421 T10421a T10858 T11195 T11276 T11303b T11374 T11822 T12227 T12545 T12707 T13035 T13253 T13253-spj T13379 T13701 T13719 T14683 T14697 T15164 T15630 T16577 T17096 T17516 T17836 T17836b T17977 T17977b T18140 T18282 T18304 T18478 T18698a T18698b T18923 T1969 T3064 T5030 T5321FD T5321Fun T5631 T5642 T5837 T783 T9198 T9233 T9630 T9872d T9961 WWRec Metric Increase: T4801 (cherry picked from commit 3b1aa7dba7c006b473855a6b199b15fa3a3d77a0)
* Don't produce platformConstants fileSylvain Henry2021-06-045-25/+0
| | | | | | It isn't used for anything anymore (cherry picked from commit 2cdc95f9c068421a55c634933ab2d8596eb992fb)
* Constants: add a note and fix minor doc glitchesSylvain Henry2021-06-044-29/+79
| | | | (cherry picked from commit b699c4fb0d23616a20d160f04a893f514fc7e38c)
* Read constants header instead of global platformConstantsSylvain Henry2021-06-0410-38/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch we switch from reading the globally installed platformConstants file to reading the DerivedConstants.h header file that is bundled in the RTS unit. When we build the RTS unit itself, we get it from its includes directories. The new parser is more efficient and strict than the Read instance for PlatformConstants and we get about 2.2MB less allocations in every cases. However it only really shows in tests that don't allocate much, hence the following metric decreases. Metric Decrease: Naperian T10421 T10547 T12150 T12234 T12425 T13035 T18304 T18923 T5837 T6048 T18140 T14697 (cherry picked from commit 085983e63bfe6af23f8b85fbfcca8db4872d2f60)
* Generate parser for DerivedConstants.hSylvain Henry2021-06-041-31/+89
| | | | | | | | deriveConstants utility now generates a Haskell parser for DerivedConstants.h. It can be used to replace the one used to read platformConstants file. (cherry picked from commit 9c762f27d5468ab692e390b16420c9e304993993)
* Remove dynamic-by-default (#16782)Sylvain Henry2021-06-0418-72/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dynamic-by-default was a mechanism to automatically select the -dynamic way for some targets. It was implemented in a convoluted way: it was defined as a flavour option, hence it couldn't be passed as a global settings (which are produced by `configure` before considering flavours), so a build system rule was used to pass -DDYNAMIC_BY_DEFAULT to the C compiler so that deriveConstants could infer it. * Make build system has it disabled for 8 years (951e28c0625ece7e0db6ac9d4a1e61e2737b10de) * It has never been implemented in Hadrian * Last time someone tried to enable it 1 year ago it didn't work (!2436) * Having this as a global constant impedes making GHC multi-target (see !5427) This commit fully removes support for dynamic-by-default. If someone wants to reimplement something like this, it would probably need to move the logic in the compiler. (Doing this would probably need some refactoring of the way the compiler handles DynFlags: DynFlags are used to store and to pass enabled ways to many parts of the compiler. It can be set by command-line flags, GHC API, global settings. In multi-target GHC, we will use DynFlags to load the target platform and its constants: but at this point with the current DynFlags implementation we can't easily update the existing DynFlags with target-specific options such as dynamic-by-default without overriding ways previously set by the user.) (cherry picked from commit d014ab0db0c167ab5a0f9cb15280aee6fd8f3621)
* Bignum: match on DataCon workers in rules (#19892)Sylvain Henry2021-06-016-12/+59
| | | | | | | | | | | We need to match on DataCon workers for the rules to be triggered. T13701 ghc/alloc decreases by ~2.5% on some archs Metric Decrease: T13701 (cherry picked from commit 2d9c806988ac6027930f25801f1cce080df3b037)
* Improve wording of fold[lr]M documentation.Viktor Dukhovni2021-05-291-53/+77
| | | | | | | | | | | | | | | The sequencing of monadic effects in foldlM and foldrM was described as respectively right-associative and left-associative, but this could be confusing, as in essence we're just composing Kleisli arrows, whose composition is simply associative. What matters therefore is the order of sequencing of effects, which can be described more clearly without dragging in associativity as such. This avoids describing these folds as being both left-to-right and right-to-left depending on whether we're tracking effects or operator application. The new text should be easier to understand.
* Use fix-sized order primops for fixed size boxed typesJohn Ericson2021-05-192-24/+24
| | | | | | Progress towards #19026 (cherry picked from commit c6de580547728ddfc20a3a0914bc767a282c24ec)
* EPA: update some comments in Annotations.Alan Zimmerman2021-05-171-119/+82
| | | | | | Follow-up from !2418, see #19579 (cherry picked from commit ad5a3aeb1d3094acbc17f07a2cc8388676d59dd1)
* Disallow -XDerivingVia when -XSafe is on (#19786)Aaron Allen2021-05-134-1/+23
| | | | | | | Since `GeneralizedNewtypeDeriving` is considered unsafe, `DerivingVia` should be as well. (cherry picked from commit 0281dae8b3fe3384939c415ae72ca2440b3cafb3)
* EPA: Fix incorrect SrcSpan for FamDeclAlan Zimmerman2021-05-139-16/+37
| | | | | | | | | The SrcSpan for a type family declaration did not include the family equations. Closes #19821 (cherry picked from commit c34f4c0cf55ac5c81b6600daab2a66e0adf89f50)
* users-guide: Add OverloadedRecordDot and OverloadedRecordUpdate for ghc-9.2Takenobu Tani2021-05-131-0/+9
| | | | | This patch adds OverloadedRecordDot and OverloadedRecordUpdate in 9.2.1's release note.
* EPA: record annotations for braces in LetStmtAlan Zimmerman2021-05-126-5/+15
| | | | | | Closes #19814 (cherry picked from commit c3868451e974ee16762a1804d568afea8ed691c7)
* EPA: Use custom AnnsIf structure for HsIf and HsCmdIfAlan Zimmerman2021-05-129-16/+72
| | | | | | | | | This clearly identifies the presence and location of optional semicolons in an if statement. Closes #19813 (cherry picked from commit 32367cac4e586fb5aedaa021b257388392d976c4)
* EPA: properly capture leading semicolons in statement listsAlan Zimmerman2021-05-127-8/+24
| | | | | | | | | | | | | | | | For the fragment blah = do { ; print "a" ; print "b" } capture the leading semicolon before 'print "a"' in 'al_rest' in AnnList instead of in 'al_trailing'. Closes #19798 (cherry picked from commit 736d47ffb7370ba4348b142c913b88e4c82347d0)
* EPA: properly capture semicolons between Matches in a FunBindAlan Zimmerman2021-05-129-64/+88
| | | | | | | | | | | | | | | | | For the source module MatchSemis where { a 0 = 1; a _ = 2; } Make sure that the AddSemiAnn entries for the two trailing semicolons are attached to the component Match elements. Closes #19784 (cherry picked from commit 1635d5c229a3ea0bc8e0ee862948cda2c435221a)
* Make sized division primops ok-for-spec (#19026)Sylvain Henry2021-05-122-14/+47
| | | | (cherry picked from commit e61d2d47c4942c829ec98016be5aa5ae36982524)
* rts: export allocateWrite, freeWrite and markExec #19763Adam Sandberg Ericsson2021-05-121-0/+10
| | | | (cherry picked from commit 2d2985a79eec3d6ae9aee96b264c97c2b158f196)
* Propagate free variables in extract_lctxt correctlyRyan Scott2021-05-123-1/+27
| | | | | | | This fixes an oversight in the implementation of `extract_lctxt` which was introduced in commit ce85cffc. Fixes #19759. (cherry picked from commit c2541c49f162f1d03b0ae55f47b9c76cc96df76f)
* users-guide: Add missing FieldSelectors to GHC2021 listBen Gamari2021-05-121-0/+1
| | | | (cherry picked from commit 0165b0295c81247ae97a4689ae6e1fbd2fbc9311)
* users guide: Sort lists of implied language extensionsBen Gamari2021-05-121-20/+20
| | | | (cherry picked from commit b51897494a65a6478d2ca60a4fbbec945ae27627)
* users-guide: Clarify GHC2021 documentationBen Gamari2021-05-121-1/+7
| | | | | | | Point out that GHC2021 doesn't offer the same degree of stability that Haskell2010 does, as noted by @phadej. (cherry picked from commit 78288b97f3486d79581343a40732804d96b3b57c)
* Fix Haddock referenceBen Gamari2021-05-121-1/+1
| | | | (cherry picked from commit a42346970839feffdae6e5a570bde71a91ef8491)
* Eliminate unsafeEqualityProof in CorePrepSimon Peyton Jones2021-05-1223-223/+525
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main idea here is to avoid treating * case e of {} * case unsafeEqualityProof of UnsafeRefl co -> blah specially in CoreToStg. Instead, nail them in CorePrep, by converting case e of {} ==> e |> unsafe-co case unsafeEqualityProof of UnsafeRefl cv -> blah ==> blah[unsafe-co/cv] in GHC.Core.Prep. Now expressions that we want to treat as trivial really are trivial. We can get rid of cpExprIsTrivial. And we fix #19700. A downside is that, at least under unsafeEqualityProof, we substitute in types and coercions, which is more work. But a big advantage is that it's all very simple and principled: CorePrep really gets rid of the unsafeCoerce stuff, as it does empty case, runRW#, lazyId etc. I've updated the overview in GHC.Core.Prep, and added Note [Unsafe coercions] in GHC.Core.Prep Note [Implementing unsafeCoerce] in base:Unsafe.Coerce We get 3% fewer bytes allocated when compiling perf/compiler/T5631, which uses a lot of unsafeCoerces. (It's a happy-generated parser.) Metric Decrease: T5631 (cherry picked from commit 6c7fff0b6f9514d6572cbe6bbfa4aafc259caebe)
* Fix magicDict in ghci (and in the presence of other ticks)Matthew Pickering2021-05-129-2/+71
| | | | | | | | | | | | | The problem was that ghci inserts some ticks around the crucial bit of the expression. Just like in some of the other rules we now strip the ticks so that the rule fires more reliably. It was possible to defeat magicDict by using -fhpc as well, so not just an issue in ghci. Fixes #19667 and related to #19673 (cherry picked from commit 6974c9e478120f6c4eeb53ebfa935c30cafcdf8e)
* users guide: Various other cleanupsBen Gamari2021-05-121-1/+0
| | | | (cherry picked from commit 9d34f4546ab54c3dbb8f7be8f3e855d370592e8d)
* users-guide: Document deprecation of -funfolding-keeness-factorBen Gamari2021-05-122-1/+9
| | | | | | See #15304. (cherry picked from commit 3339ed49b103d5aab42733dfb434de3a9a27bf2b)
* Bignum: add BigNat Eq/Ord instances (#19647)Sylvain Henry2021-05-121-0/+16
| | | | (cherry picked from commit a951e06921f05df1601d9c3a39efcede27f3330c)
* [docs] release notes for !4729 + !3678Douglas Wilson2021-05-121-0/+32
| | | | | | Also includes small unrelated type fix (cherry picked from commit 70c39e220aa75608e277f311b53f8428c2abc4ff)
* Add Eq1 and Ord1 Fixed instancesOleg Grenrus2021-05-122-1/+11
| | | | (cherry picked from commit 045e5f49f81f98b8cfaeee08b572617a173f33da)
* Revert "[darwin] stop the DYLD_LIBRARY_PATH madness"Ben Gamari2021-05-121-2/+5
| | | | This reverts commit 07f8e38f39af84601bb663460de0c5227d8b54e5.
* Report actual port in libiserv:Remote.Slave.startSlaveFacundo Domínguez2021-05-121-1/+2
| | | | | | | | This allows to start iserv by passing port 0 to startSlave, which in turns allows to get an available port when no port is known to be free a priori. (cherry picked from commit b39dec86df8106a2bb4770758941572073ad57a2)
* fix sub-word literals in GHCiLuite Stegeman2021-05-128-9/+299
| | | | (cherry picked from commit 2783d4981e4079f87a9d06036ea393949a5580b9)
* [hadrian] Do not add full tool pathswip/angerman/fix-nix-storeMoritz Angermann2021-05-113-4/+32
| | | | | | This prohuibits CC=clang to work generically and will always bake in the clang that is found on the build machine in PATH, what ever clang that might be. It might not even be on the final host.
* [ci/darwin] set SH to /bin/bashMoritz Angermann2021-05-111-1/+1
| | | | This should prevent some other `bash` to leak into the binary distributions.
* [ci/darwin] cabal-cache dir can be specified per archMoritz Angermann2021-05-113-23/+38
| | | | Also while we are at it, run shellcheck on ci.sh
* [ci/darwin] use system provided iconv and cursesMoritz Angermann2021-05-114-10/+35
| | | | Also make sure to be able to build with non-apple-clang, while using apple's SDK on macOS
* [bindist] inject xattr -c -r . into the darwin install phaseMoritz Angermann2021-05-112-0/+17
| | | | This is so awful, but at least it might get the job done.
* [ci] no more brew or pipMoritz Angermann2021-05-111-15/+0
| | | | | We pull dependencies (reliably) via nix, and open up nix where needed.
* Bump binary submoduleBen Gamari2021-05-101-0/+0
| | | | Fixes #19631.
* [rts] disassemble bco, when running with -Diwip/angerman/interpreter-disassemble-bcoMoritz Angermann2021-05-071-1/+1
|
* [testsuite] :tada: best typo ever!wip/angerman/fix-llvm-typoMoritz Angermann2021-05-071-1/+1
|
* hadrian: Don't depend upon bash from PATHwip/angerman/backport-bf34a310Ben Gamari2021-05-066-7/+30
| | | | | | | | | | Previously Hadrian depended implicitly upon whatever `bash` it found in `PATH`, offerring no way for the user to override. Fix this by detecting `sh` in `configure` and passing the result to Hadrian. Fixes #19797. (cherry picked from commit bf34a310a19c1f8f1c8f9686a077d5c04a1510cf)