HpcInfo(..), noHpcInfo,
-- Breakpoints
- ModBreaks (..), BreakIndex, emptyModBreaks
+ ModBreaks (..), BreakIndex, emptyModBreaks,
+
+ -- Vectorisation information
+ VectInfo(..), IfaceVectInfo(..), noVectInfo, plusVectInfo,
+ noIfaceVectInfo
) where
#include "HsVersions.h"
-- instances (for classes and families)
-- combined
+ -- Vectorisation information
+ mi_vect_info :: !IfaceVectInfo,
+
-- Cached environments for easy lookup
-- These are computed (lazily) from other fields
-- and are not put into the interface file
mg_foreign :: !ForeignStubs,
mg_deprecs :: !Deprecations, -- Deprecations declared in the module
mg_hpc_info :: !HpcInfo, -- info about coverage tick boxes
- mg_modBreaks :: !ModBreaks
+ mg_modBreaks :: !ModBreaks,
+ mg_vect_info :: !VectInfo -- Pool of vectorised declarations
}
-- The ModGuts takes on several slightly different forms:
mi_decls = [],
mi_globals = Nothing,
mi_rule_vers = initialVersion,
+ mi_vect_info = noIfaceVectInfo,
mi_dep_fn = emptyIfaceDepCache,
mi_fix_fn = emptyIfaceFixCache,
mi_ver_fn = emptyIfaceVerCache
-- ic_toplev_scope and ic_exports
ic_tmp_ids :: [Id], -- Names bound during interaction.
- -- Earlier Ids shadow
- -- later ones with the same OccName.
+ -- Later Ids shadow
+ -- earlier ones with the same OccName.
ic_tyvars :: TyVarSet -- skolem type variables free in
-- ic_tmp_ids. These arise at
-> TyVarSet
-> InteractiveContext
extendInteractiveContext ictxt ids tyvars
- = ictxt { ic_tmp_ids = ids ++ ic_tmp_ids ictxt,
+ = ictxt { ic_tmp_ids = ic_tmp_ids ictxt ++ ids,
+ -- NB. must be this way around, because we want
+ -- new ids to shadow existing bindings.
ic_tyvars = ic_tyvars ictxt `unionVarSet` tyvars }
\end{code}
type PackageRuleBase = RuleBase
type PackageInstEnv = InstEnv
type PackageFamInstEnv = FamInstEnv
+type PackageVectInfo = VectInfo
data ExternalPackageState
= EPS {
-- modules
eps_fam_inst_env :: !PackageFamInstEnv,-- Ditto FamInstEnv
eps_rule_base :: !PackageRuleBase, -- Ditto RuleEnv
+ eps_vect_info :: !PackageVectInfo, -- Ditto VectInfo
eps_mod_fam_inst_env :: !(ModuleEnv FamInstEnv), -- identifies family
- -- instances of each mod
-
+ -- instances of each mod
eps_stats :: !EpsStats
}
%************************************************************************
%* *
+\subsection{Vectorisation Support}
+%* *
+%************************************************************************
+
+The following information is generated and consumed by the vectorisation
+subsystem. It communicates the vectorisation status of declarations from one
+module to another.
+
+\begin{code}
+-- ModGuts version
+data VectInfo = VectInfo {
+ vectInfoCCVar :: NameSet
+ }
+
+-- ModIface version
+data IfaceVectInfo = IfaceVectInfo {
+ ifaceVectInfoCCVar :: [Name]
+ }
+
+noVectInfo :: VectInfo
+noVectInfo = VectInfo emptyNameSet
+
+plusVectInfo :: VectInfo -> VectInfo -> VectInfo
+plusVectInfo vi1 vi2 =
+ VectInfo (vectInfoCCVar vi1 `unionNameSets` vectInfoCCVar vi2)
+
+noIfaceVectInfo :: IfaceVectInfo
+noIfaceVectInfo = IfaceVectInfo []
+\end{code}
+
+%************************************************************************
+%* *
\subsection{Linkable stuff}
%* *
%************************************************************************