| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
As noted in !3132, this has rather severe knock-on consequences in
user-code. We'll need to revisit this before merging something along
these lines.
This reverts commit 9749fe1223d182b1f8e7e4f7378df661c509f396.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Fixed by @alp (see https://gitlab.haskell.org/ghc/ghc/issues/16051#note_274265)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
`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.
|
| |
|
|
|
|
| |
See discussion in https://gitlab.haskell.org/ghc/ghc/issues/13009#note_268610
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
The immediate goal is let the hie-bios.bat script
set CABFLAGS with `-v0` and remove all cabal output
except the compiler arguments
|
|
|
|
| |
It is a direct translation of the sh script
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Fixes #18206.
|
|
|
|
| |
Fixes #17926.
|
|
|
|
|
|
|
|
|
|
|
|
| |
- `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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
[skip ci]
|
|
|
|
| |
It doesn't belong into GHC.Unit.State
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The testcase works now.
See explanation in https://gitlab.haskell.org/ghc/ghc/issues/11506#note_273202
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
* 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"
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
If we are on a 64 bit platform, we can use the efficient Enum Word
methods for the Enum Word64 instance.
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
In GHC, not in the code being compiled!
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|