summaryrefslogtreecommitdiff
path: root/utils
Commit message (Collapse)AuthorAgeFilesLines
* packaging: Give ghc-pkg the same version as ProjectVersionMatthew Pickering2021-08-041-1/+1
| | | | (cherry picked from commit e4c252619ebb0b10db9061b052ddce6f8f2b5c72)
* Update llvm-targetsghc-8.10.5-releasewip/8.10-changelog-updatesZubin Duggal2021-06-041-0/+1
|
* make: disable ghc package environments #18988Adam Sandberg Ericsson2021-04-071-0/+1
| | | | (cherry picked from commit f27a71449aeb86ad9afa02431b3bd1a62ff5400a)
* Bump haddock submodule to 2.24.1Moritz Angermann2021-03-261-0/+0
| | | | This should make it buildable (outside of the ghc tree) again.
* touchy: use a valid cabal-versionSylvain Henry2021-03-071-1/+1
|
* Allocate Adjustors and mark them readable in two stepsMoritz Angermann2021-02-181-1/+1
| | | | | | | | | This drops allocateExec for darwin, and replaces it with a alloc, write, mark executable strategy instead. This prevents us from trying to allocate an executable range and then write to it, which X^W will prohibit on darwin. This will *only* work if we can use mmap.
* [llvm-targets] add {arm64,aarch64}-apple-darwinwip/angerman/8.10.5-rollup-1Moritz Angermann2021-02-151-2/+5
|
* Fix Windows buildBen Gamari2020-10-081-1/+1
|
* Bump text submodule to 1.2.4.0+Ben Gamari2020-10-061-2/+2
| | | | Fixes #18588 and #17956.
* Revert "iserv: Don't pass --export-dynamic on FreeBSD"Ben Gamari2020-08-031-2/+1
| | | | | | This reverts commit 2290eb02cf95e9cfffcb15fc9c593d5ef79c75d9. (cherry picked from commit f9b7497d30d98a054d4ec5a8df2dfaf4a2b0bb30)
* Bump hsc2hs submodule to 0.68.7Ben Gamari2020-07-291-0/+0
|
* Fix scoping of TyCon binders in TcTyClsDeclsSimon Peyton Jones2020-05-311-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes #17566 by refactoring the way we decide the final identity of the tyvars in the TyCons of a possibly-recursive nest of type and class decls, possibly with associated types. It's all laid out in Note [Swizzling the tyvars before generaliseTcTyCon] Main changes: * We have to generalise each decl (with its associated types) all at once: TcTyClsDecls.generaliseTyClDecl * The main new work is done in TcTyClsDecls.swizzleTcTyConBndrs * The mysterious TcHsSyn.zonkRecTyVarBndrs dies altogether Other smaller things: * A little refactoring, moving bindTyClTyVars from tcTyClDecl1 to tcDataDefn, tcSynRhs, etc. Clearer, reduces the number of parameters * Reduce the amount of swizzling required. Specifically, bindExplicitTKBndrs_Q_Tv doesn't need to clone a new Name for the TyVarTv, and not cloning means that in the vasly common case, swizzleTyConBndrs is a no-op In detail: Rename newTyVarTyVar --> cloneTyVarTyVar Add newTyVarTyTyVar that doesn't clone Use the non-cloning newTyVarTyVar in bindExplicitTKBndrs_Q_Tv Rename newFlexiKindedTyVarTyVar --> cloneFlexiKindedTyVarTyVar * Define new utility function and use it HsDecls.familyDeclName :: FamilyDecl (GhcPass p) -> IdP (GhcPass p) Updates haddock submodule. (cherry picked from commit b9605396f1f1560aea94792646b835cadcb49f45)
* iserv: Don't pass --export-dynamic on FreeBSDBen Gamari2020-05-301-1/+2
| | | | | | | | This is definitely a hack but it's probably the best we can do for now. Hadrian does the right thing here by passing --export-dynamic only to the linker. (cherry picked from commit 2290eb02cf95e9cfffcb15fc9c593d5ef79c75d9)
* Bump Haddock submodule for 2.24 releaseghc-8.10.1-releaseAlec Theriault2020-03-221-0/+0
|
* Bump hsc2hs submoduleBen Gamari2020-03-171-0/+0
| | | | Fixes Darwin build failure due to CPP whitespace.
* Bump hsc2hs to 0.68.7Ben Gamari2020-03-161-0/+0
|
* fs.h: Add missing declarations on WindowsBen Gamari2020-03-141-0/+7
|
* Fs: Fix UNC remapping code.Tamar Christina2020-03-101-2/+6
| | | | (cherry picked from commit 5670881d7779ecd7eee8c969dab66ee343298532)
* fs: Port fixes from ghc-jailbreak repositoryBen Gamari2020-02-221-25/+89
| | | | | | | * Override rename, unlink, and remove * Factor out wchar conversion (cherry picked from commit bdb2e37550fed13ad1d5cf1d76c8cc90b4d823fb)
* Bump hsc2hs submoduleBen Gamari2020-01-161-0/+0
|
* hpc: Fix encoding issues. Add test for and fix #17073Alexey Kuleshevich2020-01-063-33/+11
| | | | | | | | | | | | | | * Make sure files are being read/written in UTF-8. Set encoding while writing HTML output. Also set encoding while writing and reading .tix files although we don't yet have a ticket complaining that this poses problems. * Set encoding in html header to utf8 * Upgrade to new version of 'hpc' library and reuse `readFileUtf8` and `writeFileUtf8` functions * Update git submodule for `hpc` * Bump up `hpc` executable version Co-authored-by: Ben Gamari <ben@smart-cactus.org> (cherry picked from commit afb23168fd28087ad0af339b559f90e3b70f2460)
* Update to Cabal submodule to v3.2.0.0-alpha3Oleg Grenrus2019-12-306-12/+14
| | | | | Metric Increase: haddock.Cabal
* Add --show-unit-ids flag to ghc-pkgOleg Grenrus2019-12-111-9/+22
| | | | | I only added it into --simple-output and ghc-pkg check output; there are probably other places where it can be adopted.
* Bump hsc2hs submoduleBen Gamari2019-11-211-0/+0
| | | | | | Including Phyx's backport of the process changes fixing #17480. (cherry picked from commit 8967b6867f069546c55cbed9024c42bfe95ca68e)
* Bump version to 8.10.0Ben Gamari2019-11-171-0/+0
| | | | Bumps haddock submodule.
* base: Bump version to 4.14.0.0Ben Gamari2019-11-142-0/+0
| | | | | Metric Increase: T4801
* Ensure that coreView/tcView are able to inlineBen Gamari2019-11-131-0/+0
| | | | | | | | | | | | | | | | | | | | Previously an import cycle between Type and TyCoRep meant that several functions in TyCoRep ended up SOURCE import coreView. This is quite unfortunate as coreView is intended to be fused into a larger pattern match and not incur an extra call. Fix this with a bit of restructuring: * Move the functions in `TyCoRep` which depend upon things in `Type` into `Type` * Fold contents of `Kind` into `Type` and turn `Kind` into a simple wrapper re-exporting kind-ish things from `Type` * Clean up the redundant imports that popped up as a result Closes #17441. Metric Decrease: T4334
* Bump hsc2hs submoduleBen Gamari2019-11-071-0/+0
|
* configure: Add checking python3-sphinxTakenobu Tani2019-11-063-0/+32
| | | | | | | | | | | | | | | This checks the configuration about python3-sphinx. We need python3-sphinx instead of python2-sphinx to build documentation. The approach is as follows: * Check python3 version with custom `conf.py` invoked from sphinx-build` executable * Place custom `conf.py` into new `utils/check-sphinx` directory If sphinx is for python2 not python3, it's treated as config ERROR instead of WARN. See also #17346 and #17356.
* Separate `LPat` from `Pat` on the type-levelSebastian Graf2019-11-021-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the Trees That Grow effort started, we had `type LPat = Pat`. This is so that `SrcLoc`s would only be annotated in GHC's AST, which is the reason why all GHC passes use the extension constructor `XPat` to attach source locations. See #15495 for the design discussion behind that. But now suddenly there are `XPat`s everywhere! There are several functions which dont't cope with `XPat`s by either crashing (`hsPatType`) or simply returning incorrect results (`collectEvVarsPat`). This issue was raised in #17330. I also came up with a rather clean and type-safe solution to the problem: We define ```haskell type family XRec p (f :: * -> *) = r | r -> p f type instance XRec (GhcPass p) f = Located (f (GhcPass p)) type instance XRec TH f = f p type LPat p = XRec p Pat ``` This is a rather modular embedding of the old "ping-pong" style, while we only pay for the `Located` wrapper within GHC. No ping-ponging in a potential Template Haskell AST, for example. Yet, we miss no case where we should've handled a `SrcLoc`: `hsPatType` and `collectEvVarsPat` are not callable at an `LPat`. Also, this gets rid of one indirection in `Located` variants: Previously, we'd have to go through `XPat` and `Located` to get from `LPat` to the wrapped `Pat`. Now it's just `Located` again. Thus we fix #17330.
* Revert "Replace freebsd-gnueabihf with freebsd"Ben Gamari2019-10-291-2/+2
| | | | | This reverts commit aa31ceaf7568802590f73a740ffbc8b800096342 as suggested in #17392.
* Use FlexibleInstances for `Outputable (* p)` instead of match-all instances ↵Sebastian Graf2019-10-281-0/+0
| | | | | | | | | | | | | | with equality constraints In #17304, Richard and Simon dicovered that using `-XFlexibleInstances` for `Outputable` instances of AST data types means users can provide orphan `Outputable` instances for passes other than `GhcPass`. Type inference doesn't currently to suffer, and Richard gave an example in #17304 that shows how rare a case would be where the slightly worse type inference would matter. So I went ahead with the refactoring, attempting to fix #17304.
* Merge non-moving garbage collectorBen Gamari2019-10-231-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a concurrent mark & sweep garbage collector to manage the old generation. The concurrent nature of this collector typically results in significantly reduced maximum and mean pause times in applications with large working sets. Due to the large and intricate nature of the change I have opted to preserve the fully-buildable history, including merge commits, which is described in the "Branch overview" section below. Collector design ================ The full design of the collector implemented here is described in detail in a technical note > B. Gamari. "A Concurrent Garbage Collector For the Glasgow Haskell > Compiler" (2018) This document can be requested from @bgamari. The basic heap structure used in this design is heavily inspired by > K. Ueno & A. Ohori. "A fully concurrent garbage collector for > functional programs on multicore processors." /ACM SIGPLAN Notices/ > Vol. 51. No. 9 (presented at ICFP 2016) This design is intended to allow both marking and sweeping concurrent to execution of a multi-core mutator. Unlike the Ueno design, which requires no global synchronization pauses, the collector introduced here requires a stop-the-world pause at the beginning and end of the mark phase. To avoid heap fragmentation, the allocator consists of a number of fixed-size /sub-allocators/. Each of these sub-allocators allocators into its own set of /segments/, themselves allocated from the block allocator. Each segment is broken into a set of fixed-size allocation blocks (which back allocations) in addition to a bitmap (used to track the liveness of blocks) and some additional metadata (used also used to track liveness). This heap structure enables collection via mark-and-sweep, which can be performed concurrently via a snapshot-at-the-beginning scheme (although concurrent collection is not implemented in this patch). Implementation structure ======================== The majority of the collector is implemented in a handful of files: * `rts/Nonmoving.c` is the heart of the beast. It implements the entry-point to the nonmoving collector (`nonmoving_collect`), as well as the allocator (`nonmoving_allocate`) and a number of utilities for manipulating the heap. * `rts/NonmovingMark.c` implements the mark queue functionality, update remembered set, and mark loop. * `rts/NonmovingSweep.c` implements the sweep loop. * `rts/NonmovingScav.c` implements the logic necessary to scavenge the nonmoving heap. Branch overview =============== ``` * wip/gc/opt-pause: | A variety of small optimisations to further reduce pause times. | * wip/gc/compact-nfdata: | Introduce support for compact regions into the non-moving |\ collector | \ | \ | | * wip/gc/segment-header-to-bdescr: | | | Another optimization that we are considering, pushing | | | some segment metadata into the segment descriptor for | | | the sake of locality during mark | | | | * | wip/gc/shortcutting: | | | Support for indirection shortcutting and the selector optimization | | | in the non-moving heap. | | | * | | wip/gc/docs: | |/ Work on implementation documentation. | / |/ * wip/gc/everything: | A roll-up of everything below. |\ | \ | |\ | | \ | | * wip/gc/optimize: | | | A variety of optimizations, primarily to the mark loop. | | | Some of these are microoptimizations but a few are quite | | | significant. In particular, the prefetch patches have | | | produced a nontrivial improvement in mark performance. | | | | | * wip/gc/aging: | | | Enable support for aging in major collections. | | | | * | wip/gc/test: | | | Fix up the testsuite to more or less pass. | | | * | | wip/gc/instrumentation: | | | A variety of runtime instrumentation including statistics | | / support, the nonmoving census, and eventlog support. | |/ | / |/ * wip/gc/nonmoving-concurrent: | The concurrent write barriers. | * wip/gc/nonmoving-nonconcurrent: | The nonmoving collector without the write barriers necessary | for concurrent collection. | * wip/gc/preparation: | A merge of the various preparatory patches that aren't directly | implementing the GC. | | * GHC HEAD . . . ```
| * rts: Give stack flags proper macrosBen Gamari2019-10-181-0/+3
| | | | | | | | | | This were previously quite unclear and will change a bit under the non-moving collector so let's clear this up now.
* | Make dynflag argument for withTiming pure.Andreas Klebinger2019-10-231-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | 19 times out of 20 we already have dynflags in scope. We could just always use `return dflags`. But this is in fact not free. When looking at some STG code I noticed that we always allocate a closure for this expression in the heap. Clearly a waste in these cases. For the other cases we can either just modify the callsite to get dynflags or use the _D variants of withTiming I added which will use getDynFlags under the hood.
* | Implement s390x LLVM backend.Stefan Schulze Frielinghaus2019-10-221-0/+2
| | | | | | | | | | | | This patch adds support for the s390x architecture for the LLVM code generator. The patch includes a register mapping of STG registers onto s390x machine registers which enables a registerised build.
* | Replace freebsd-gnueabihf with freebsdMatthew Bauer2019-10-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | FreeBSD does not support GNU libc, so it makes no sense to use this triple. Most likely previous builds were just using the FreeBSD libc instead of gnueabihf. To fix this, we should just use armv6-unknown-freebsd and armv7-unknown-freebsd triples. Note that both of these are actually "soft-float", not "hard-float". FreeBSD has never officially released hard-float arm32: https://wiki.freebsd.org/ARMTier1
* | Windows: Update tarballs to GCC 9.2 and remove MAX_PATH limit.Tamar Christina2019-10-203-37/+294
|/
* Delete ghctags cabal fileJohn Ericson2019-10-161-23/+0
| | | | | It came back to life in 381c3ae31b68019177f1cd20cb4da2f9d3b7d6c6 by mistake.
* Rename STAGE macro to GHC_STAGEBen Gamari2019-10-091-1/+1
| | | | To avoid polluting the macro namespace
* users-guide: Run sphinx in nit-picky modeBen Gamari2019-10-081-0/+0
| | | | This ensure that it blurts an error on missing references.
* Get rid of GHC_PACKAGE_DB_FLAGJohn Ericson2019-10-071-1/+1
| | | | | We no longer support booting from older GHC since 527bcc41630918977c73584d99125ff164400695.
* Refactor, document, and optimize LLVM configuration loadingBen Gamari2019-10-071-0/+3
| | | | | | | | | | | | As described in the new Note [LLVM Configuration] in SysTools, we now load llvm-targets and llvm-passes lazily to avoid the overhead of doing so when -fllvm isn't used (also known as "the common case"). Noticed in #17003. Metric Decrease: T12234 T12150
* Add musl systems to llvm-targetsMatthew Bauer2019-10-041-0/+13
| | | | | | This was done in Nixpkgs, but never upstreamed. Musl is pretty much the same as gnu, but with a different libc. I’ve used the same values for everything.
* Factor out a smaller part of Platform for host fallbackJohn Ericson2019-10-041-11/+7
|
* Per stage headers, ghc_boot_platform.h -> stage 0 ghcplatform.hJohn Ericson2019-10-045-5/+14
| | | | | | | | | | | | | | | | | | The generated headers are now generated per stage, which means we can skip hacks like `ghc_boot_platform.h` and just have that be the stage 0 header as proper. In general, stages are to be embraced: freely generate everything in each stage but then just build what you depend on, and everything is symmetrical and efficient. Trying to avoid stages because bootstrapping is a mind bender just creates tons of bespoke mini-mind-benders that add up to something far crazier. Hadrian was pretty close to this "stage-major" approach already, and so was fairly easy to fix. Make needed more work, however: it did know about stages so at least there was a scaffold, but few packages except for the compiler cared, and the compiler used its own counting system. That said, make and Hadrian now work more similarly, which is good for the transition to Hadrian. The merits of embracing stage aside, the change may be worthy for easing that transition alone.
* Remove unneeded CPP now that GHC 8.6 is the minimumRyan Scott2019-09-251-7/+0
| | | | | | | The minimum required GHC version for bootstrapping is 8.6, so we can get rid of some unneeded `#if `__GLASGOW_HASKELL__` CPP guards, as well as one `MIN_VERSION_ghc_prim(0,5,3)` guard (since GHC 8.6 bundles `ghc-prim-0.5.3`).
* Module hierarchy: Hs (#13009)Sylvain Henry2019-09-202-1/+1
| | | | | | | Add GHC.Hs module hierarchy replacing hsSyn. Metric Increase: haddock.compiler
* Deduplicate `HaskellMachRegs.h` and `RtsMachRegs.h` headersJohn Ericson2019-09-171-1/+1
| | | | | | | Until 0472f0f6a92395d478e9644c0dbd12948518099f there was a meaningful host vs target distinction (though it wasn't used right, in genapply). After that, they did not differ in meaningful ways, so it's best to just only keep one.
* Windows: Fix hsc2hs non-deterministic failures.Tamar Christina2019-09-131-0/+0
|