[Git][ghc/ghc][wip/jsSaturate] 18 commits: DmdAnal: Unleash demand signatures of free RULE and unfolding binders (#23208)
Josh Meredith (@JoshMeredith)
gitlab at gitlab.haskell.org
Mon May 1 06:43:59 UTC 2023
Josh Meredith pushed to branch wip/jsSaturate at Glasgow Haskell Compiler / GHC
Commits:
c30ac25f by Sebastian Graf at 2023-04-26T14:50:51-04:00
DmdAnal: Unleash demand signatures of free RULE and unfolding binders (#23208)
In #23208 we observed that the demand signature of a binder occuring in a RULE
wasn't unleashed, leading to a transitively used binder being discarded as
absent. The solution was to use the same code path that we already use for
handling exported bindings.
See the changes to `Note [Absence analysis for stable unfoldings and RULES]`
for more details.
I took the chance to factor out the old notion of a `PlusDmdArg` (a pair of a
`VarEnv Demand` and a `Divergence`) into `DmdEnv`, which fits nicely into our
existing framework. As a result, I had to touch quite a few places in the code.
This refactoring exposed a few small bugs around correct handling of bottoming
demand environments. As a result, some strictness signatures now mention uniques
that weren't there before which caused test output changes to T13143, T19969 and
T22112. But these tests compared whole -ddump-simpl listings which is a very
fragile thing to begin with. I changed what exactly they test for based on the
symptoms in the corresponding issues.
There is a single regression in T18894 because we are more conservative around
stable unfoldings now. Unfortunately it is not easily fixed; let's wait until
there is a concrete motivation before invest more time.
Fixes #23208.
- - - - -
77f506b8 by Josh Meredith at 2023-04-26T14:51:28-04:00
Refactor GenStgRhs to include the Type in both constructors (#23280, #22576, #22364)
Carry the actual type of an expression through the PreStgRhs and into GenStgRhs
for use in later stages. Currently this is used in the JavaScript backend to fix
some tests from the above mentioned issues: EtaExpandLevPoly, RepPolyWrappedVar2,
T13822, T14749.
- - - - -
052e2bb6 by Alan Zimmerman at 2023-04-26T14:52:05-04:00
EPA: Use ExplicitBraces only in HsModule
!9018 brought in exact print annotations in LayoutInfo for open and
close braces at the top level.
But it retained them in the HsModule annotations too.
Remove the originals, so exact printing uses LayoutInfo
- - - - -
d5c4629b by Cheng Shao at 2023-04-27T16:00:35-04:00
ci: update ci.sh to actually run the entire testsuite for wasm backend
For the time being, we still need to use in-tree mode and can't test
the bindist yet.
- - - - -
533d075e by Cheng Shao at 2023-04-27T16:00:35-04:00
ci: additional wasm32 manual jobs in validate pipelines
This patch enables bignum native & unregisterised wasm32 jobs as
manual jobs in validate pipelines, which can be useful to prevent
breakage when working on wasm32 related patches.
- - - - -
b5f00811 by Cheng Shao at 2023-04-27T16:00:35-04:00
testsuite: fix cross prefix stripping
This patch fixes cross prefix stripping in the testsuite driver. The
normalization logic used to only handle prefixes of the triple form
<arch>-<vendor>-<os>, now it's relaxed to allow any number of tokens
in the prefix tuple, so the cross prefix stripping logic would work
when ghc is configured with something like --target=wasm32-wasi.
- - - - -
6f511c36 by Cheng Shao at 2023-04-27T16:00:35-04:00
testsuite: include target exe extension in heap profile filenames
This patch fixes hp2ps related framework failures when testing the
wasm backend by including target exe extension in heap profile
filenames.
- - - - -
e6416b10 by Cheng Shao at 2023-04-27T16:00:35-04:00
testsuite: exclude ghci ways if no rts linker is present
This patch implements logic to automatically exclude ghci ways when
there is no rts linker. It's way better than having to annotate
individual test cases.
- - - - -
791cce64 by Cheng Shao at 2023-04-27T16:00:35-04:00
testsuite: fix permission bits in copy_files
When the testsuite driver copy files instead of symlinking them, it
should also copy the permission bits, otherwise there'll be permission
denied errors. Also, enforce file copying when testing wasm32, since
wasmtime doesn't handle host symlinks quite well
(https://github.com/bytecodealliance/wasmtime/issues/6227).
- - - - -
aa6afe8a by Cheng Shao at 2023-04-27T16:00:35-04:00
testsuite: add the req_ghc_with_threaded_rts predicate
This patch adds the req_ghc_with_threaded_rts predicate to the
testsuite to assert the platform has threaded RTS, and mark some tests
as req_ghc_with_threaded_rts. Also makes ghc_with_threaded_rts a
config field instead of a global variable.
- - - - -
ce580426 by Cheng Shao at 2023-04-27T16:00:35-04:00
testsuite: add the req_process predicate
This patch adds the req_process predicate to the testsuite to assert
the platform has a process model, also marking tests that involve
spawning processes as req_process. Also bumps hpc & process submodule.
- - - - -
cb933665 by Cheng Shao at 2023-04-27T16:00:35-04:00
testsuite: add the req_host_target_ghc predicate
This patch adds the req_host_target_ghc predicate to the testsuite to
assert the ghc compiler being tested can compile both host/target
code. When testing cross GHCs this is not supported yet, but it may
change in the future.
- - - - -
b174a110 by Cheng Shao at 2023-04-27T16:00:35-04:00
testsuite: add missing annotations for some tests
This patch adds missing annotations (req_th, req_dynamic_lib_support,
req_rts_linker) to some tests. They were discovered when testing
wasm32, though it's better to be explicit about what features they
require, rather than simply adding when(arch('wasm32'), skip).
- - - - -
bd2bfdec by Cheng Shao at 2023-04-27T16:00:35-04:00
testsuite: wasm32-specific fixes
This patch includes all wasm32-specific testsuite fixes.
- - - - -
4eaf2c2a by Josh Meredith at 2023-04-27T16:01:11-04:00
JS: change GHC.JS.Transform.identsS/E/V to take a saturated IR (#23304)
- - - - -
57277662 by sheaf at 2023-04-29T20:23:06+02:00
Add the Unsatisfiable class
This commit implements GHC proposal #433, adding the Unsatisfiable
class to the GHC.TypeError module. This provides an alternative to
TypeError for which error reporting is more predictable: we report it
when we are reporting unsolved Wanted constraints.
Fixes #14983 #16249 #16906 #18310 #20835
- - - - -
00a8a5ff by Torsten Schmits at 2023-04-30T03:45:09-04:00
Add structured error messages for GHC.Rename.Names
Tracking ticket: #20115
MR: !10336
This converts uses of `mkTcRnUnknownMessage` to newly added constructors
of `TcRnMessage`.
- - - - -
910740bb by Josh Meredith at 2023-05-01T06:42:22+00:00
WIP refactor jsSaturate to return a saturated IR
- - - - -
30 changed files:
- .gitlab/ci.sh
- .gitlab/gen_ci.hs
- .gitlab/jobs.yaml
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/Builtin/Types/Prim.hs
- compiler/GHC/ByteCode/Instr.hs
- compiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Core/Opt/SpecConstr.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/CoreToStg.hs
- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Data/Bag.hs
- compiler/GHC/Hs.hs
- compiler/GHC/JS/Transform.hs
- compiler/GHC/Parser.y
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Stg/BcPrep.hs
- compiler/GHC/Stg/CSE.hs
- compiler/GHC/Stg/Debug.hs
- compiler/GHC/Stg/FVs.hs
- compiler/GHC/Stg/InferTags.hs
- compiler/GHC/Stg/InferTags/Rewrite.hs
- compiler/GHC/Stg/Lift.hs
- compiler/GHC/Stg/Lift/Analysis.hs
- compiler/GHC/Stg/Lift/Monad.hs
- compiler/GHC/Stg/Lint.hs
- compiler/GHC/Stg/Stats.hs
- compiler/GHC/Stg/Syntax.hs
- compiler/GHC/Stg/Unarise.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/117fc799b5caa7280526fbcc5cdf523dfb7a57ce...910740bb10a82bc2e95af042bbbf6ba6376e61f3
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/117fc799b5caa7280526fbcc5cdf523dfb7a57ce...910740bb10a82bc2e95af042bbbf6ba6376e61f3
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230501/a17e18cf/attachment-0001.html>
More information about the ghc-commits
mailing list