- -- | Mapping from TyCons to their vectorised versions.
- -- TyCons which do not have to be vectorised are mapped to themselves.
- , global_tycons :: NameEnv TyCon
+ , global_vect_decls :: VarEnv (Type, CoreExpr)
+ -- ^Mapping from global variables that have a vectorisation declaration to the right-hand
+ -- side of that declaration and its type. This mapping only applies to non-scalar
+ -- vectorisation declarations. All variables with a scalar vectorisation declaration are
+ -- mentioned in 'global_scalars_vars'.
+
+ , global_scalar_vars :: VarSet
+ -- ^Purely scalar variables. Code which mentions only these variables doesn't have to be
+ -- lifted. This includes variables from the current module that have a scalar
+ -- vectorisation declaration and those that the vectoriser determines to be scalar.
+
+ , global_scalar_tycons :: NameSet
+ -- ^Type constructors whose values can only contain scalar data. Scalar code may only
+ -- operate on such data.
+
+ , global_novect_vars :: VarSet
+ -- ^Variables that are not vectorised. (They may be referenced in the right-hand sides
+ -- of vectorisation declarations, though.)
+
+ , global_exported_vars :: VarEnv (Var, Var)
+ -- ^Exported variables which have a vectorised version.
+
+ , global_tycons :: NameEnv TyCon
+ -- ^Mapping from TyCons to their vectorised versions.
+ -- TyCons which do not have to be vectorised are mapped to themselves.