Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
17f080e8
Commit
17f080e8
authored
Jul 09, 2007
by
rl@cse.unsw.edu.au
Browse files
Extend vectorisation environment
parent
b715bd16
Changes
1
Show whitespace changes
Inline
Side-by-side
compiler/vectorise/Vectorise.hs
View file @
17f080e8
...
...
@@ -86,10 +86,14 @@ initBuiltins
}
data
VEnv
=
VEnv
{
-- Mapping from variables to their vectorised versions. Mapping
-- to expressions instead of just Vars gives us more freedom.
-- Mapping from global variables to their vectorised versions.
--
vect_vars
::
VarEnv
CoreExpr
vect_global_vars
::
VarEnv
CoreExpr
-- Mapping from local variables to their vectorised and lifted
-- versions.
--
,
vect_local_vars
::
VarEnv
(
CoreExpr
,
CoreExpr
)
-- Exported variables which have a vectorised version
--
...
...
@@ -98,15 +102,27 @@ data VEnv = VEnv {
-- Mapping from TyCons to their vectorised versions.
-- TyCons which do not have to be vectorised are mapped to
-- themselves.
--
,
vect_tycons
::
NameEnv
TyCon
-- Mapping from TyCons to their PA dictionaries
--
,
vect_tycon_pa
::
NameEnv
CoreExpr
-- Mapping from tyvars to their PA dictionaries
--
,
vect_tyvar_pa
::
VarEnv
CoreExpr
}
initVEnv
::
VectInfo
->
DsM
VEnv
initVEnv
info
=
return
$
VEnv
{
vect_vars
=
mapVarEnv
(
Var
.
snd
)
$
vectInfoCCVar
info
vect_global_vars
=
mapVarEnv
(
Var
.
snd
)
$
vectInfoCCVar
info
,
vect_local_vars
=
emptyVarEnv
,
vect_exported_vars
=
emptyVarEnv
,
vect_tycons
=
mapNameEnv
snd
$
vectInfoCCTyCon
info
,
vect_tycon_pa
=
emptyNameEnv
,
vect_tyvar_pa
=
emptyVarEnv
}
-- FIXME
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment