| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
| |
This patch removes 'userHsLTyVarBndrs' and 'userHsTyVarBndrs' from HsUtils.
These helper functions were not used anywhere.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before the change ./configure detected numa support automatically
withoun a nice way to disable autodetection.
The change adds `--enable-numa` / `--disable-numa` switch to
override the default. If `--enable-numa` is passed and `libnuma`
is not present then configure will fail.
Reported-by: Sergey Alirzaev
Bug: https://github.com/gentoo-haskell/gentoo-haskell/issues/955
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Noticed by @simonmar in !1362:
If the srtEntry is Nothing, then it should be safe to omit
references to this SRT from other SRTs, even if it is a static
function.
When updating SRT map we don't omit references to static functions (see
Note [Invalid optimisation: shortcutting]), but there's no reason to add
an SRT entry for a static function if the function is not CAFFY.
(Previously we'd add SRT entries for static functions even when they're
not CAFFY)
Using 9151b99e I checked sizes of all SRTs when building GHC and
containers:
- GHC: 583736 (HEAD), 581695 (this patch). 2041 less SRT entries.
- containers: 2457 (HEAD), 2381 (this patch). 76 less SRT entries.
|
|
|
|
|
| |
This was inadvertently referring to the cabal-install-latest/ directory
which is volatile.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were two problems with LLVM version checking:
- The parser would only parse x and x.y formatted versions. E.g. 1.2.3
would be rejected.
- The version check was too strict and would reject x.y formatted
versions. E.g. when we support version 7 it'd reject 7.0 ("LLVM
version 7.0") and only accept 7 ("LLVM version 7").
We now parse versions with arbitrarily deep minor numbering (x.y.z.t...)
and accept versions as long as the major version matches the supported
version (e.g. 7.1, 7.1.2, 7.1.2.3 ...).
|
| |
|
|
|
|
| |
[ci skip]
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `mkOneConFull` function of the pattern match checker used to try to
guess the type arguments of the data type's type constructor by looking
at the ambient type of the match. This doesn't work well for Pattern
Synonyms, where the result type isn't even necessarily a TyCon
application, and it shows in #11336 and #17112.
Also the effort seems futile; why try to try hard when the type checker
has already done the hard lifting? After this patch, we instead supply
the type constructors arguments as an argument to the function and
lean on the type-annotated AST.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This generalizes code generators (outputAsm, outputLlvm, outputC, and
the call site codeOutput) so that they'll return the return values of
the passed Cmm streams.
This allows accumulating data during Cmm generation and returning it to
the call site in HscMain.
Previously the Cmm streams were assumed to return (), so the code
generators returned () as well.
This change is required by !1304 and !1530.
Skipping CI as this was tested before and I only updated the commit
message.
[skip ci]
|
| |
|
| |
|
|
|
|
| |
[skip ci]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before the change
./configure --disable-dwarf-debug
enabled DWARF debugging unconditionally.
This happened due to use of 5-argument form of `AC_ARG_ENABLE`
without actually checking the passed `$enableval` parameter:
```
AC_ARG_ENABLE(dwarf-unwind,
[AC_HELP_STRING([--enable-dwarf-unwind],
[Enable DWARF unwinding support in the runtime system via elfutils' libdw [default=no]])],
[AC_CHECK_LIB(dw, dwfl_attach_state,
[UseLibdw=YES],
[AC_MSG_ERROR([Cannot find system libdw (required by --enable-dwarf-unwind)])])]
[UseLibdw=NO]
)
```
Note:
- `[UseLibdw=NO]` is called when `--{enable,disable}-dwarf-unwind`
is not passed at all as a parameter (ok).
- `[AC_CHECK_LIB(dw, dwfl_attach_state, [UseLibdw=YES],` is called
for both:
* `--enable-dwarf-unwind` being passed: `$enableval = "yes"` (ok).
* --disable-dwarf-unwind` being passed: `$enableval = "no"` (bad).
The change is to use 3-argument `AC_ARG_ENABLE` and check for passed
value as `"$enable_dwarf_unwind" = "yes"`.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
| |
Use LEB128 encoding for Int/Word variants. This reduces
the size of interface files significantly. (~19%).
Also includes a few small optimizations to make unboxing
work better that I have noticed while looking at the core.
|
|
|
|
|
|
|
|
|
| |
This adds a Stream.consume function, uses it in LLVM and C code
generators, and removes the use of Stream.collect function which was
used to collect streaming Cmm generation results into a list.
LLVM and C backends now properly use streamed Cmm generation, instead of
collecting Cmm groups into a list before generating LLVM/C code.
|
|
|
|
|
|
|
|
|
| |
Previously we were using an empty ModuleSRTInfo for each Cmm group with
-split-section. As far as I can see this has no benefits, and
simplifying this makes another patch simpler (!1304).
We also remove some outdated comments: we no longer generate one
module-level SRT.
|
|
|
|
| |
While avoiding #16943.
|
|
|
|
|
| |
This commit adds documentation on Hadrian's 'Expr' type and
references the documentation in hadrian/README.md
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
We now do a shallow closure check on objects in compact regions.
See the new comment on why we can't do a "normal" closure check.
|
| |
|
|
|
|
|
|
|
|
| |
`TcTyClsDecls.tcFamDecl1` was using `NotInjective` when creating data
family type constructors, which is just plain wrong. This tweaks it
to use `Injective` instead.
Fixes #17067.
|
| |
|
|
|
|
|
|
| |
Make `exactLog2` faster (use `countLeadingZeros` and Int32 bit-ops).
On my Core i7-9700k Criterion reports ~50% speedup (from 16 to 8ns).
|
| |
|
|
|
|
|
|
| |
`quot` and `rem` are implemented efficiently when the second argument
is a constant power of 2. This patch uses the same implementations for
`quotRem` primop.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
These kinds of imports are necessary in some cases such as
importing instances of typeclasses or intentionally creating
dependencies in the build system, but '-Wunused-imports' can't
detect when they are no longer needed. This commit removes the
unused ones currently in the code base (not including test files
or submodules), with the hope that doing so may increase
parallelism in the build system by removing unnecessary
dependencies.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #16509.
See Note [Not-necessarily-lifted join points] in ByteCodeGen,
which tells the full story.
This commit also adds some comments and cleans some code
in the byte-code generator, as I was exploring around trying
to understand it.
(This commit removes an old test -- this is really a GHCi problem,
not a pattern-synonym problem.)
test case: ghci/scripts/T16509
|
|
|
|
|
|
|
|
|
|
|
|
| |
The later caused issues on windows by being translated into
"\\dev\\null" and python then trying to open this non-existant file.
So we now use os.devnull inside python and convert it to "/dev/null"
when calling out to the shell, which is bound to run in a unix like
environment.
This fixes an issue a test producing unexpected stderr output failed
with a framework failure instead of showing a diff of the output.
|
|
|
|
|
|
|
|
|
|
|
|
| |
We used to serialise large integers as strings. Now they are serialized
as a list of Bytes.
This changes the size for a Integer in the higher 64bit range from 77 to
9 bytes when written to disk.
The impact on the general case is small (<1% for interface files) as we
don't use many Integers. But for code that uses many this should be a
nice benefit.
|
| |
|
|
|
|
|
| |
The `UniqDFM` is deterministic, of course, while we provide an unsafe
`NonDetUniqFM` wrapper for `UniqFM` to opt into nondeterministic instances.
|
|
|
|
|
|
|
| |
This does not make any changes in the contents -- formatting only.
Previously the comments were too noisy and I've always found it very
hard to read. Hopefully it's easier to read now.
|
| |
|
|
|
|
|
| |
AndreasK recently mentioned that he thought that interface file loading
may be a non-trivial cost. Let's measure.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`TablesNextToCode` is now a substituted by configure, where it has the
correct defaults and error handling. Nowhere else needs to duplicate
that, though we may want the compiler to to guard against bogus settings
files.
I renamed it from `GhcEnableTablesNextToCode` to `TablesNextToCode` to:
- Help me guard against any unfixed usages
- Remove any lingering connotation that this flag needs to be combined
with `GhcUnreigsterised`.
Original reviewers:
Original subscribers: TerrorJack, rwbarton, carter
Original Differential Revision: https://phabricator.haskell.org/D5082
|
|
|
|
|
|
| |
This reverts commit 4e1dfc3767167dddd0e151a2df8305b12aa0f49c.
Due to #16943.
|
| |
|
|
|
|
| |
files
|
| |
|
| |
|
| |
|