X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fvectorise%2FVectorise%2FMonad%2FGlobal.hs;h=632845f31039a8656e60bfff5a8c680d6ffbe468;hp=ae68ffbc5cdc0fcf878788d8981c4e2a5a1b640c;hb=2c8aabcad1d2f2c469cb8a10afa7b66beeaedd45;hpb=f2aaae9757e7532485c97f6c9a9ed5437542d1dd diff --git a/compiler/vectorise/Vectorise/Monad/Global.hs b/compiler/vectorise/Vectorise/Monad/Global.hs index ae68ffb..632845f 100644 --- a/compiler/vectorise/Vectorise/Monad/Global.hs +++ b/compiler/vectorise/Vectorise/Monad/Global.hs @@ -73,19 +73,24 @@ defGlobalVar v v' = updGEnv $ \env -> -- Vectorisation declarations ------------------------------------------------- --- | Check whether a variable has a (non-scalar) vectorisation declaration. + +-- |Check whether a variable has a (non-scalar) vectorisation declaration. +-- lookupVectDecl :: Var -> VM (Maybe (Type, CoreExpr)) lookupVectDecl var = readGEnv $ \env -> lookupVarEnv (global_vect_decls env) var -- Scalars -------------------------------------------------------------------- --- | Get the set of global scalar variables. + +-- |Get the set of global scalar variables. +-- globalScalars :: VM VarSet -globalScalars = readGEnv global_scalars +globalScalars = readGEnv global_scalar_vars --- | Check whether a given variable is in the set of global scalar variables. +-- |Check whether a given variable is in the set of global scalar variables. +-- isGlobalScalar :: Var -> VM Bool -isGlobalScalar var = readGEnv $ \env -> elemVarSet var (global_scalars env) +isGlobalScalar var = readGEnv $ \env -> elemVarSet var (global_scalar_vars env) -- TyCons ---------------------------------------------------------------------