From c9e5efbae8adb270b0962f6f739a15147d6dd306 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Fri, 8 Jul 2022 18:41:10 -0400 Subject: Fixes --- compiler/GHC/CoreToStg/Prep.hs | 1 - compiler/GHC/Stg/Lint.hs | 2 +- compiler/GHC/StgToCmm/Expr.hs | 2 +- compiler/GHC/Types/Basic.hs | 5 ++++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/compiler/GHC/CoreToStg/Prep.hs b/compiler/GHC/CoreToStg/Prep.hs index cb8373c5cc..2b3125324f 100644 --- a/compiler/GHC/CoreToStg/Prep.hs +++ b/compiler/GHC/CoreToStg/Prep.hs @@ -965,7 +965,6 @@ instance Outputable ArgInfo where {- --- TODO: make this configurable in primops.pp.txt idOpArgForms :: Id -> [OpArgForm] idOpArgForms f | Just op <- isPrimOpId_maybe f diff --git a/compiler/GHC/Stg/Lint.hs b/compiler/GHC/Stg/Lint.hs index 092ca60e81..85750982d7 100644 --- a/compiler/GHC/Stg/Lint.hs +++ b/compiler/GHC/Stg/Lint.hs @@ -176,7 +176,7 @@ lintStgArg (StgVarArg v) = lintStgVar v lintStgOpArg :: (OutputablePass a, BinderP a ~ Id) => OpArgForm -> GenStgOpArg a -> LintM () -lintStgOpArg OpArgValue (StgValueArg arg) = +lintStgOpArg _ (StgValueArg arg) = lintStgArg arg lintStgOpArg OpArgCont (StgContArg bndr body) = addInScopeVars [bndr] $ lintStgExpr body diff --git a/compiler/GHC/StgToCmm/Expr.hs b/compiler/GHC/StgToCmm/Expr.hs index c72c702035..1ffc5f1125 100644 --- a/compiler/GHC/StgToCmm/Expr.hs +++ b/compiler/GHC/StgToCmm/Expr.hs @@ -639,7 +639,7 @@ isSimpleOp (StgFCallOp (CCall (CCallSpec _ _ safe)) _) _ = return $! not (playSafe safe) -- dataToTag# evaluates its argument, see Note [dataToTag# magic] in GHC.Core.Opt.ConstantFold isSimpleOp (StgPrimOp DataToTagOp) _ = return False -isSimpleOp (StgPrimOp op) stg_args = do +isSimpleOp (StgPrimOp _op) _stg_args = do return False --TODO --arg_exprs <- getNonVoidArgAmodes stg_args diff --git a/compiler/GHC/Types/Basic.hs b/compiler/GHC/Types/Basic.hs index c90f0ea06b..2848ea3b4d 100644 --- a/compiler/GHC/Types/Basic.hs +++ b/compiler/GHC/Types/Basic.hs @@ -538,7 +538,10 @@ isMarkedCbv NotMarkedCbv = False -- | What sort of 'StgOpArg' an 'StgOp' expects. data OpArgForm = OpArgValue -- ^ a normal value argument (i.e. 'StgOpArg'). - | OpArgCont -- ^ a continuation argument (i.e. 'StgContArg'). + | OpArgCont -- ^ continuation arguments (i.e. 'StgContArg'). + -- are allowed in addition to value arguments (i.e. + -- 'StgOpArg'). + -- -- See Note [Continuation-accepting primops]. instance Outputable OpArgForm where -- cgit v1.2.1