[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 11 commits: Do primop rep-poly checks when instantiating
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Tue Jul 18 13:12:08 UTC 2023
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
889c2bbb by sheaf at 2023-07-18T06:37:32-04:00
Do primop rep-poly checks when instantiating
This patch changes how we perform representation-polymorphism checking
for primops (and other wired-in Ids such as coerce).
When instantiating the primop, we check whether each type variable
is required to instantiated to a concrete type, and if so we create a
new concrete metavariable (a ConcreteTv) instead of a simple MetaTv.
(A little subtlety is the need to apply the substitution obtained from
instantiating to the ConcreteTvOrigins, see
Note [substConcreteTvOrigin] in GHC.Tc.Utils.TcMType.)
This allows us to prevent representation-polymorphism in non-argument
position, as that is required for some of these primops.
We can also remove the logic in tcRemainingValArgs, except for
the part concerning representation-polymorphic unlifted newtypes.
The function has been renamed rejectRepPolyNewtypes; all it does now
is reject unsaturated occurrences of representation-polymorphic newtype
constructors when the representation of its argument isn't a concrete
RuntimeRep (i.e. still a PHASE 1 FixedRuntimeRep check).
The Note [Eta-expanding rep-poly unlifted newtypes] in GHC.Tc.Gen.Head
gives more explanation about a possible path to PHASE 2, which would be
in line with the treatment for primops taken in this patch.
We also update the Core Lint check to handle this new framework. This
means Core Lint now checks representation-polymorphism in continuation
position like needed for catch#.
Fixes #21906
-------------------------
Metric Increase:
LargeRecord
-------------------------
- - - - -
00648e5d by Krzysztof Gogolewski at 2023-07-18T06:38:10-04:00
Core Lint: distinguish let and letrec in locations
Lint messages were saying "in the body of letrec" even for non-recursive
let.
I've also renamed BodyOfLetRec to BodyOfLet in stg, since there's no
separate letrec.
- - - - -
787bae96 by Krzysztof Gogolewski at 2023-07-18T06:38:50-04:00
Use extended literals when deriving Show
This implements GHC proposal
https://github.com/ghc-proposals/ghc-proposals/pull/596
Also add support for Int64# and Word64#; see testcase ShowPrim.
- - - - -
257f1567 by Jaro Reinders at 2023-07-18T06:39:29-04:00
Add StgFromCore and StgCodeGen linting
- - - - -
f1b032ef by Sven Tennie at 2023-07-18T09:11:58-04:00
x86 Codegen: Implement MO_S_MulMayOflo for W16
- - - - -
829cab57 by Sven Tennie at 2023-07-18T09:11:58-04:00
x86 CodeGen: MO_S_MulMayOflo better error message for rep > W64
It's useful to see which value made the pattern match fail. (If it ever
occurs.)
- - - - -
312ccda1 by Sven Tennie at 2023-07-18T09:11:59-04:00
x86 CodeGen: Implement MO_S_MulMayOflo for W8
This case wasn't handled before. But, the test-primops test suite showed
that it actually might appear.
- - - - -
b15c7f5f by Sven Tennie at 2023-07-18T09:11:59-04:00
Add test for %mulmayoflo primop
The test expects a perfect implementation with no false positives.
- - - - -
914217e5 by Matthew Pickering at 2023-07-18T09:11:59-04:00
lint-ci-config: Generate jobs-metadata.json
We also now save the jobs-metadata.json and jobs.yaml file as artifacts
as:
* It might be useful for someone who is modifying CI to copy jobs.yaml
if they are having trouble regenerating locally.
* jobs-metadata.json is very useful for downstream pipelines to work out
the right job to download.
Fixes #23654
- - - - -
5dde7c86 by sheaf at 2023-07-18T09:12:02-04:00
Prioritise Parent when looking up class sub-binder
When we look up children GlobalRdrElts of a given Parent, we sometimes
would rather prioritise those GlobalRdrElts which have the right Parent,
and sometimes prioritise those that have the right NameSpace:
- in export lists, we should prioritise NameSpace
- for class/instance binders, we should prioritise Parent
See Note [childGREPriority] in GHC.Types.Name.Reader.
fixes #23664
- - - - -
3195da2d by Alan Zimmerman at 2023-07-18T09:12:03-04:00
EPA: Improve annotation management in getMonoBind
Ensure the LHsDecl for a FunBind has the correct leading comments and
trailing annotations.
See the added note for details.
- - - - -
30 changed files:
- .gitlab-ci.yml
- compiler/GHC/Builtin/PrimOps.hs
- compiler/GHC/Builtin/PrimOps/Ids.hs
- compiler/GHC/Builtin/Types.hs
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Cmm/MachOp.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/TyCo/Subst.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/Driver/Config/Core/Lint.hs
- compiler/GHC/HsToCore.hs
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Stg/Lint.hs
- compiler/GHC/Stg/Pipeline.hs
- compiler/GHC/Tc/Deriv/Generate.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Gen/Head.hs
- compiler/GHC/Tc/Gen/Sig.hs
- compiler/GHC/Tc/Solver/Equality.hs
- compiler/GHC/Tc/TyCl/Build.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ed41ef9d42a7a8a6adb1610840c2bb7aea53e282...3195da2d9794489becd627ccc5f4f6160d97cd7b
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/ed41ef9d42a7a8a6adb1610840c2bb7aea53e282...3195da2d9794489becd627ccc5f4f6160d97cd7b
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/20230718/1de52a2e/attachment.html>
More information about the ghc-commits
mailing list