Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Glasgow Haskell Compiler
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
17f77282
Commit
17f77282
authored
Aug 31, 2007
by
rl@cse.unsw.edu.au
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename functions
parent
e78adae7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
compiler/vectorise/VectType.hs
compiler/vectorise/VectType.hs
+12
-12
No files found.
compiler/vectorise/VectType.hs
View file @
17f77282
...
...
@@ -392,7 +392,7 @@ buildToPRepr repr vect_tc prepr_tc _
,
sum_tycon
=
tycon
})
expr
=
do
(
vars
,
bodies
)
<-
mapAndUnzipM
prod_alt
prods
(
vars
,
bodies
)
<-
mapAndUnzipM
to_unboxed
prods
return
.
Case
expr
(
mkWildId
(
exprType
expr
))
res_ty
$
zipWith4
mk_alt
cons
vars
(
tyConDataCons
tycon
)
bodies
where
...
...
@@ -403,22 +403,22 @@ buildToPRepr repr vect_tc prepr_tc _
to_repr
prod
expr
=
do
(
vars
,
body
)
<-
prod_alt
prod
(
vars
,
body
)
<-
to_unboxed
prod
return
$
Case
expr
(
mkWildId
(
exprType
expr
))
res_ty
[(
DataAlt
con
,
vars
,
body
)]
prod_alt
(
ProdRepr
{
prod_components
=
tys
,
prod_data_con
=
data_con
})
to_unboxed
(
ProdRepr
{
prod_components
=
tys
,
prod_data_con
=
data_con
})
=
do
vars
<-
mapM
(
newLocalVar
FSLIT
(
"r"
))
tys
return
(
vars
,
mkConApp
data_con
(
map
Type
tys
++
map
Var
vars
))
prod_alt
(
IdRepr
ty
)
to_unboxed
(
IdRepr
ty
)
=
do
var
<-
newLocalVar
FSLIT
(
"y"
)
ty
return
([
var
],
Var
var
)
prod_alt
(
VoidRepr
{
void_bottom
=
bottom
})
to_unboxed
(
VoidRepr
{
void_bottom
=
bottom
})
=
return
(
[]
,
bottom
)
...
...
@@ -443,17 +443,17 @@ buildFromPRepr repr vect_tc prepr_tc _
expr
=
do
vars
<-
mapM
(
newLocalVar
FSLIT
(
"x"
))
(
map
reprType
prods
)
bodies
<-
sequence
.
zipWith3
from_
pro
d
prods
cons
bodies
<-
sequence
.
zipWith3
from_
unboxe
d
prods
cons
$
map
Var
vars
return
.
Case
expr
(
mkWildId
(
reprType
repr
))
res_ty
$
zipWith3
sum_alt
(
tyConDataCons
tycon
)
vars
bodies
where
sum_alt
data_con
var
body
=
(
DataAlt
data_con
,
[
var
],
body
)
from_repr
repr
expr
=
from_
pro
d
repr
con
expr
from_repr
repr
expr
=
from_
unboxe
d
repr
con
expr
from_
pro
d
prod
@
(
ProdRepr
{
prod_components
=
tys
,
prod_data_con
=
data_con
})
from_
unboxe
d
prod
@
(
ProdRepr
{
prod_components
=
tys
,
prod_data_con
=
data_con
})
con
expr
=
do
...
...
@@ -461,10 +461,10 @@ buildFromPRepr repr vect_tc prepr_tc _
return
$
Case
expr
(
mkWildId
(
reprType
prod
))
res_ty
[(
DataAlt
data_con
,
vars
,
con
`
mkVarApps
`
vars
)]
from_
pro
d
(
IdRepr
_
)
con
expr
from_
unboxe
d
(
IdRepr
_
)
con
expr
=
return
$
con
`
App
`
expr
from_
pro
d
(
VoidRepr
{})
con
expr
from_
unboxe
d
(
VoidRepr
{})
con
expr
=
return
con
buildToArrPRepr
::
Repr
->
TyCon
->
TyCon
->
TyCon
->
VM
CoreExpr
...
...
Write
Preview
Markdown
is supported
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