| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LlvmConfig contains information read from llvm-passes and llvm-targets
files in GHC's top directory. Reading these files is done only when
needed (i.e. when the LLVM backend is used) and cached for the whole
compiler session. This patch changes the way this is done:
- Split LlvmConfig into LlvmConfig and LlvmConfigCache
- Store LlvmConfigCache in HscEnv instead of DynFlags: there is no
good reason to store it in DynFlags. As it is fixed per session, we
store it in the session state instead (HscEnv).
- Initializing LlvmConfigCache required some changes to driver functions
such as newHscEnv. I've used the opportunity to untangle initHscEnv
from initGhcMonad (in top-level GHC module) and to move it to
GHC.Driver.Main, close to newHscEnv.
- I've also made `cmmPipeline` independent of HscEnv in order to remove
the call to newHscEnv in regalloc_unit_tests.
|
|
|
|
|
|
| |
This is now fixed on master and 9.2 branch.
Closes #21558
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When generating an SRT for a recursive group, GHC.Cmm.Info.Build.oneSRT
filters out recursive references, as described in Note [recursive SRTs].
However, doing so for static functions would be unsound, for the reason
described in Note [Invalid optimisation: shortcutting].
However, the same argument applies to static data constructor
applications, as we discovered in #20959. Fix this by ensuring that
static data constructor applications are included in recursive SRTs.
The approach here is not entirely satisfactory, but it is a starting
point.
Fixes #20959.
|
|
|
|
|
|
|
|
|
|
| |
Here we implement a few measures to improve the clarity of the CAF
analysis implementation. Specifically:
* Use CafInfo instead of Bool since the former is more descriptive
* Rename CAFLabel to CAFfyLabel, since not all CAFfyLabels are in fact
CAFs
* Add numerous comments
|
|
|
|
|
| |
Those files were moved to the perf/ subtree in 11c9a469, and then
accidentally reintroduced in 680ef2c8.
|
|
|
|
|
|
| |
This bumps the time submodule to the 1.12.2 release.
Fixes #21571
|
|
|
|
|
|
|
|
|
|
|
|
| |
This MR fixes a bad bug, where the withDict was inlined too
vigorously, which in turn made the type-class Specialiser generate
a bogus specialisation, because it saw the same overloaded function
applied to two /different/ dictionaries.
Solution: inline `withDict` later. See (WD8) of Note [withDict]
in GHC.HsToCore.Expr
See #21575, which is fixed by this change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were using defaultSDocContext for pprTrace, which suppresses
lots of useful infomation. This small MR adds
GHC.Utils.Outputable.traceSDocContext
and uses it for pprTrace and pprTraceUserWarning.
traceSDocContext is a global, and hence not influenced by flags,
but that seems unavoidable. But I made the sdocPprDebug bit
controlled by unsafeHasPprDebug, since we have the latter for
exactly this purpose.
Fixes #21569
|
|
|
|
| |
for better disambiguation (#17420)
|
|
|
|
|
|
|
| |
Test that we can successfully link against C++ code both in GHCi and
batch compilation.
See #20010
|
|
|
|
|
|
|
|
| |
Here we introduce a new "virtual" package into the initial package
database, `system-cxx-std-lib`. This gives users a convenient, platform
agnostic way to link against C++ libraries, addressing #20010.
Fixes #20010.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Here we introduce proper support for compilation of C++ objects. This
includes:
* logic in `configure` to detect the C++ toolchain and propagating this
information into the `settings` file
* logic in the driver to use the C++ toolchain when compiling C++
sources
|
| |
|
|
|
|
|
|
|
|
| |
- Remove groupWithName (unused)
- Use the RuntimeRepType synonym where possible
- Replace getUniqueM + mkSysLocalOrCoVar with mkSysLocalOrCoVarM
No functional changes.
|
|
|
|
|
| |
The lack of INLNE arity was exposed by #21531. The fix is
simple enough, if a bit clumsy.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a CI job (hackage-doc-tarball) which generates the necessary
tarballs for uploading libraries and documentation to hackage. The
release script knows to download this folder and the upload script will
also upload the release to hackage as part of the release.
The `ghc_upload_libs` script is moved from ghc-utils into .gitlab/ghc_upload_libs
There are two modes, preparation and upload.
* The `prepare` mode takes a link to a bindist and creates a folder containing the
source and doc tarballs ready to upload to hackage.
* The `upload` mode takes the folder created by prepare and performs the upload to
hackage.
Fixes #21493
Related to #21512
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements #21424.
The RTS macros get_itbl and friends are extremely helpful during debugging.
However only a select few of those were available in the compiled RTS as actual symbols
as the rest were INLINE macros.
This commit marks all of them as EXTERN_INLINE. This will still inline them at use sites
but allow us to use their compiled counterparts during debugging.
This allows us to use things like `p get_fun_itbl(ptr)` in the gdb shell
since `get_fun_itbl` will now be available as symbol!
|
|
|
|
|
|
|
|
|
|
| |
This fixes some bugs where
* -dcore-lint was being passed when building stage1 libraries with the
boot compiler
* -dcore-lint was not being passed when building executables.
Fixes #20135
|
|
|
|
|
|
|
| |
The linting flavour enables -dlint uniformly across anything build by
the stage1 compiler.
-dcmm-lint is not currently enabled because it fails on i386 (see #21563)
|
| |
|
|
|
|
| |
Resolves https://gitlab.haskell.org/ghc/ghc/-/issues/19127
|
| |
|
|
|
|
|
|
|
|
| |
Previously we would flag the symbol as weak but failed
to set its address, which must be computed from an "auxiliary"
symbol entry the follows the weak symbol.
Fixes #21556.
|
|
|
|
| |
This makes it easier to see how resolution failures nest.
|
|
|
|
|
|
|
|
|
| |
Change mulArrow to allow for printing of correct application precedence
where necessary and update callers of mulArrow to reflect this.
As part of this, move mulArrow from GHC/Utils/Outputtable to GHC/Iface/Type.
Fixes #20315
|
|
|
|
|
| |
The documentation still mentioned Derived constraints and
an outdated datatype TcPluginResult.
|
|
|
|
|
| |
Metric Decrease:
T16875
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #21546
|
|
|
|
| |
This missing guard gave rise to #21519.
|
|
|
|
|
| |
Since f6e366c058b136f0789a42222b8189510a3693d1 setExecutable has been
dead code. Drop it.
|
|
|
|
|
|
|
| |
We still build Deb9 bindists for now due to Ubuntu 18 and Linux Mint 19
not being at EOL until April 2023 and they still need tinfo5.
Fixes #21469
|
|
|
|
|
|
| |
Both #20878 and #21196 were caused by unwanted dynamic dependencies
being introduced by boot libraries. Ensure that we catch this in CI by
attempting to run GHC in an environment with a minimal PATH.
|
|
|
|
|
|
|
|
|
|
|
| |
Ticket #21489 showed that the saturation mechanism for
DFuns (see Note Specialising DFuns) should use both
UnspecType and UnspecArg.
We weren't doing that; but this MR fixes that problem.
No test case because it's hard to tickle, but it showed up in
Gergo's work with GHC-as-a-library.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code
do; a <- doAsync; b
Generated an incorrect Anchor for the statement list that starts after
the first semicolon.
This commit fixes it.
Closes #20256
|
|
|
|
|
|
| |
The old code used by via-C backend didn't handle the sign bit of NaN.
See #21043.
|
| |
|
|
|
|
|
|
|
|
| |
When passed `--use-system-libffi` then we shouldn't copy and install the
headers from the system package. Instead the headers are expected to be
available as a runtime dependency on the users system.
Fixes #21485 #21487
|
|
|
|
|
|
|
|
|
|
|
| |
This has high potential for oversubcribing as many haddock jobs can be
spawned in parralel which will each request the given number of
capabilities.
Once -jsem is implemented (#19416, !5176) we can expose that haddock via
haddock and use that to pass a semaphore.
Ticket #21136
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the make bindists we generate documentation in docs/ghc-<VER> but the
hadrian bindists generate docs/ghc/ so the path to the GHC API docs was
wrong in the index.html file.
Rather than make the hadrian and make bindists the same it was easier to
assume that if you're using the mkDocs script that you're using hadrian
bindists.
Fixes #21509
|
|
|
|
|
|
|
| |
We assumed the wrapper for an unlifted binding is the identity,
but as #21516 showed, that is no always true.
Solution is simple: use it.
|
|
|
|
|
|
|
|
|
| |
In 8f71d958 the make build system was made to use split-sections on
linux systems but it appears this logic never made it to hadrian.
There is the split_sections flavour transformer but this doesn't appear
to be used for perf builds on linux.
Closes #21135
|
|
|
|
|
|
|
|
|
|
|
|
| |
The splitSections transformer has been broken since -dynamic-too support
was implemented in hadrian. This is because we actually build the
dynamic way when building the dynamic way, so the predicate would always
fail.
The fix is to just always pass `split-sections` even if it doesn't do
anything for a particular way.
Fixes #21138
|
|
|
|
|
|
|
|
|
|
| |
This fixes #21479
See Note [Unquantified tyvars in a pattern synonym]
While doing this, I found that some error messages pointed at the
pattern synonym /name/, rather than the /declaration/ so I widened the
SrcSpan to encompass the declaration.
|
|
|
|
|
|
|
| |
As noted in #21485, we checked for ffi.h yet then failed to throw an
error if it is missing.
Fixes #21485.
|
|
|
|
|
|
|
|
|
|
|
|
| |
It seems like it was just an oversight to use the incorrect DynFlags
(global rather than local) when implementing these two options. Using
the local flags allows users to request these intermediate files get
cleaned up, which works fine in --make mode because
1. Interface files are stored in memory
2. Object files are only cleaned at the end of session (after link)
Fixes #21349
|