summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* hadrian: Don't track GHC's verbosity argumentwip/T18131Ben Gamari2020-05-241-2/+4
| | | | | Teach hadrian to ignore GHC's -v argument in its recompilation check, thus fixing #18131.
* Make Unicode brackets opening/closing tokens (#18225)Joshua Price2020-05-245-4/+35
| | | | | | | The tokens `[|`, `|]`, `(|`, and `|)` are opening/closing tokens as described in GHC Proposal #229. This commit makes the unicode variants (`⟦`, `⟧`, `⦇`, and `⦈`) act the same as their ASCII counterparts.
* Hadrian: fix hp2ps error during cross-compilationSylvain Henry2020-05-241-0/+1
| | | | Fixed by @alp (see https://gitlab.haskell.org/ghc/ghc/issues/16051#note_274265)
* Hadrian: fix distDir per stageSylvain Henry2020-05-241-2/+5
|
* Hadrian: fix cross-compiler build (#16051)Sylvain Henry2020-05-241-14/+33
|
* Remove unused hs-boot fileMatthew Pickering2020-05-242-8/+1
|
* Add orderingTyCon to wiredInTyCons (#18185)Ryan Scott2020-05-244-6/+38
| | | | | | | | | | `Ordering` needs to be wired in for use in the built-in `CmpNat` and `CmpSymbol` type families, but somehow it was never added to the list of `wiredInTyCons`, leading to the various oddities observed in #18185. Easily fixed by moving `orderingTyCon` from `basicKnownKeyNames` to `wiredInTyCons`. Fixes #18185.
* Bump haddock submoduleSylvain Henry2020-05-241-0/+0
|
* Rename GHC.Hs.Types into GHC.Hs.TypeSylvain Henry2020-05-2429-42/+42
| | | | See discussion in https://gitlab.haskell.org/ghc/ghc/issues/13009#note_268610
* Rename GHC.Core.Arity into GHC.Core.Opt.AritySylvain Henry2020-05-2422-33/+33
|
* Move Config module into GHC.SettingsSylvain Henry2020-05-2416-22/+21
|
* Remove not needed hie-bios outputjneira2020-05-241-2/+0
|
* Add specific configuration for windows in hie.yamljneira2020-05-241-0/+3
|
* Honour previous values for CABAL and CABFLAGSjneira2020-05-241-2/+8
| | | | | | The immediate goal is let the hie-bios.bat script set CABFLAGS with `-v0` and remove all cabal output except the compiler arguments
* Add hie-bios script for windows systemsjneira2020-05-241-0/+5
| | | | It is a direct translation of the sh script
* git: Add ignored commits fileBen Gamari2020-05-231-0/+23
| | | | | | | This can be used to tell git to ignore bulk renaming commits like the recently-finished module hierarchy refactoring. Configured with, git config blame.ignoreRevsFile .git-ignore-revs
* users-guide: Clarify meaning of -haddock flagBen Gamari2020-05-231-2/+3
| | | | Fixes #18206.
* Bump process submoduleBen Gamari2020-05-231-0/+0
| | | | Fixes #17926.
* Fix #18145 and also avoid needless work with implicit varsJohn Ericson2020-05-235-78/+117
| | | | | | | | | | | | - `forAllOrNothing` now is monadic, so we can trace whether we bind an explicit `forall` or not. - #18145 arose because the free vars calculation was needlessly complex. It is now greatly simplified. - Replaced some other implicit var code with `filterFreeVarsToBind`. Co-authored-by: Ryan Scott <ryan.gl.scott@gmail.com>
* simplCore: Ignore ticks in rule templatesBen Gamari2020-05-232-2/+30
| | | | | | | | | | | | This fixes #17619, where a tick snuck in to the template of a rule, resulting in a panic during rule matching. The tick in question was introduced via post-inlining, as discussed in `Note [Simplifying rules]`. The solution we decided upon was to simply ignore ticks in the rule template, as discussed in `Note [Tick annotations in RULE matching]`. Fixes #18162. Fixes #17619.
* Implement cstringLength# and FinalPtrAndrew Martin2020-05-2319-28/+328
| | | | | | | | | | | | | | | | | | | | This function and its accompanying rule resolve issue #5218. A future PR to the bytestring library will make the internal Data.ByteString.Internal.unsafePackAddress compute string length with cstringLength#. This will improve the status quo because it is eligible for constant folding. Additionally, introduce a new data constructor to ForeignPtrContents named FinalPtr. This additional data constructor, when used in the IsString instance for ByteString, leads to more Core-to-Core optimization opportunities, fewer runtime allocations, and smaller binaries. Also, this commit re-exports all the functions from GHC.CString (including cstringLength#) in GHC.Exts. It also adds a new test driver. This test driver is used to perform substring matches on Core that is dumped after all the simplifier passes. In this commit, it is used to check that constant folding of cstringLength# works.
* docs: fix formatting and add some linksAdam Sandberg Ericsson2020-05-232-45/+51
| | | | [skip ci]
* Move isDynLinkName into GHC.Types.NameSylvain Henry2020-05-214-38/+36
| | | | It doesn't belong into GHC.Unit.State
* Sort deterministically metric outputKrzysztof Gogolewski2020-05-211-1/+1
| | | | | | Previously, we sorted according to the test name and way, but the metrics (max_bytes_used/peak_megabytes_allocated etc.) were appearing in nondeterministic order.
* Add a regression test for #11506Krzysztof Gogolewski2020-05-212-0/+14
| | | | | The testcase works now. See explanation in https://gitlab.haskell.org/ghc/ghc/issues/11506#note_273202
* Don't variable-length encode magic iface constant.Andreas Klebinger2020-05-212-66/+80
| | | | | | | | | | | | | | | We changed to use variable length encodings for many types by default, including Word32. This makes sense for numbers but not when Word32 is meant to represent four bytes. I added a FixedLengthEncoding newtype to Binary who's instances interpret their argument as a collection of bytes instead of a number. We then use this when writing/reading magic numbers to the iface file. I also took the libery to remove the dummy iface field. This fixes #18180.
* Fix wording in primops documentation to reflect the correct reasoning:Alexey Kuleshevich2020-05-211-5/+5
| | | | | | | | | * Besides resizing functions, shrinking ones also mutate the size of a mutable array and because of those two `sizeofMutabeByteArray` and `sizeofSmallMutableArray` are now deprecated * Change reference in documentation to the newer functions `getSizeof*` instead of `sizeof*` for shrinking functions * Fix incorrect mention of "byte" instead of "small"
* Clarify pitfalls of NegativeLiterals; see #18022.Galen Huntington2020-05-211-7/+15
|
* Make `Int`'s `mod` and `rem` strict in their first argumentsSebastian Graf2020-05-211-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | They used to be strict until 4d2ac2d (9 years ago). It's obviously better to be strict for performance reasons. It also blocks #18067. NoFib results: ``` -------------------------------------------------------------------------------- Program Allocs Instrs -------------------------------------------------------------------------------- integer -1.1% +0.4% wheel-sieve2 +21.2% +20.7% -------------------------------------------------------------------------------- Min -1.1% -0.0% Max +21.2% +20.7% Geometric Mean +0.2% +0.2% ``` The regression in `wheel-sieve2` is due to reboxing that likely will go away with the resolution of #18067. See !3282 for details. Fixes #18187.
* MR template should ask for key partRichard Eisenberg2020-05-211-1/+6
|
* Document INLINE(ABLE) pragmas that enable fusionbuggymcbugfix2020-05-211-3/+21
|
* Piggyback on Enum Word methods for Word64buggymcbugfix2020-05-211-4/+38
| | | | | If we are on a 64 bit platform, we can use the efficient Enum Word methods for the Enum Word64 instance.
* Add INLINABLE pragmas to Enum list producersbuggymcbugfix2020-05-213-5/+60
| | | | | | | The INLINABLE pragmas ensure that we export stable (unoptimised) unfoldings in the interface file so we can do list fusion at usage sites. Related tickets: #15185, #8763, #18178.
* Fix spelling mistakes and typosbuggymcbugfix2020-05-214-6/+6
|
* Use braces with do in `SplicePat` case for consistencyJohn Ericson2020-05-211-2/+2
|
* Tiny cleaup eta-reduce away a function argumentJohn Ericson2020-05-211-2/+2
| | | | In GHC, not in the code being compiled!
* Put `PatEnv` first in `GHC.Tc.Gen.Pat.Checker`John Ericson2020-05-211-62/+65
|
* More judiciously panic in `ts_pat`John Ericson2020-05-211-3/+3
|
* Use `Checker` for `tc_lpat` and `tc_lpats`John Ericson2020-05-211-32/+25
|
* Use `Checker` for `tc_pat`John Ericson2020-05-211-56/+58
|
* llvmGen: Consider Relocatable read-only data as not constantReferences: #18137Tuan Le2020-05-216-13/+42
|
* Update documentation for GHCi :scriptStefan Holdermans2020-05-212-3/+8
| | | | | | | | | This patch adds the fixes that allow for file names containing spaces to be passed to GHCi's ':script' command to the release notes for 8.12 and expands the user-guide documentation for ':script' by mentioning how such file names can be passed. Related to #18027.
* Allow GHCi :script file names in double quotesStefan Holdermans2020-05-213-2/+7
| | | | | | | | | | | | | | This patch updates the user interface of GHCi so that file names passed to the ':script' command can be wrapped in double quotes. For example: :script "foo bar.script" The implementation uses a modified version of 'words' that treats character sequences enclosed in double quotes as single words. Fixes #18027.
* Add extra tests for GHCi :script syntax checksStefan Holdermans2020-05-213-0/+5
| | | | | | | | The syntax for GHCi's ":script" command allows for only a single file name to be passed as an argument. This patch adds a test for the cases in which a file name is missing or multiple file names are passed. Related to #T18027.
* Allow spaces in GHCi :script file namesStefan Holdermans2020-05-215-1/+18
| | | | | | | | | | | | | | This patch updates the user interface of GHCi so that file names passed to the ':script' command may contain spaces escaped with a backslash. For example: :script foo\ bar.script The implementation uses a modified version of 'words' that does not break on escaped spaces. Fixes #18027.
* gitlab-ci: Set locale to C.UTF-8.Gleb Popov2020-05-213-2/+5
|
* NCG: Codelayout: Distinguish conditional and other branches.Andreas Klebinger2020-05-211-3/+54
| | | | | | | | | | | | | | In #18053 we ended up with a suboptimal code layout because the code layout algorithm didn't distinguish between conditional and unconditional control flow. We can completely eliminate unconditional control flow instructions by placing blocks next to each other, not so much for conditionals. In terms of implementation we simply give conditional branches less weight before computing the layout. Fixes #18053
* Refactor linear reg alloc to remember past assignments.Andreas Klebinger2020-05-2116-48/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When assigning registers we now first try registers we assigned to in the past, instead of picking the "first" one. This is in extremely helpful when dealing with loops for which variables are dead for part of the loop. This is important for patterns like this: foo = arg1 loop: use(foo) ... foo = getVal() goto loop; There we: * assign foo to the register of arg1. * use foo, it's dead after this use as it's overwritten after. * do other things. * look for a register to put foo in. If we pick an arbitrary one it might differ from the register the start of the loop expect's foo to be in. To fix this we simply look for past register assignments for the given variable. If we find one and the register is free we use that register. This reduces the need for fixup blocks which match the register assignment between blocks. In the example above between the end and the head of the loop. This patch also moves branch weight estimation ahead of register allocation and adds a flag to control it (cmm-static-pred). * It means the linear allocator is more likely to assign the hotter code paths first. * If it assign these first we are: + Less likely to spill on the hot path. + Less likely to introduce fixup blocks on the hot path. These two measure combined are surprisingly effective. Based on nofib we get in the mean: * -0.9% instructions executed * -0.1% reads/writes * -0.2% code size. * -0.1% compiler allocations. * -0.9% compile time. * -0.8% runtime. Most of the benefits are simply a result of removing redundant moves and spills. Reduced compiler allocations likely are the result of less code being generated. (The added lookup is mostly non-allocating).
* nonmoving: Optimise the write barrierBen Gamari2020-05-211-21/+18
|
* Lint should say when it is checking a ruleBen Price2020-05-211-1/+5
| | | | | | | | | | | | | | | | It is rather confusing that when lint finds an error in a rule attached to a binder, it reports the error as in the RHS, not the rule: ... In the RHS of foo We add a clarifying line: ... In the RHS of foo In a rule attached to foo The implication that the rule lives inside the RHS is a bit odd, but this niggle is already present for unfoldings, whose pattern we are following.