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
ee79af08
Commit
ee79af08
authored
Aug 30, 2007
by
rl@cse.unsw.edu.au
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix vectorisation of sum type constructors
parent
49dca6ac
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
1 deletion
+18
-1
compiler/prelude/PrelNames.lhs
compiler/prelude/PrelNames.lhs
+6
-0
compiler/vectorise/VectBuiltIn.hs
compiler/vectorise/VectBuiltIn.hs
+6
-0
compiler/vectorise/VectType.hs
compiler/vectorise/VectType.hs
+5
-0
compiler/vectorise/VectUtils.hs
compiler/vectorise/VectUtils.hs
+1
-1
No files found.
compiler/prelude/PrelNames.lhs
View file @
ee79af08
...
...
@@ -223,6 +223,7 @@ ndpNames = [ parrayTyConName, paTyConName, preprTyConName, prTyConName
, closureTyConName
, mkClosureName, applyClosureName
, mkClosurePName, applyClosurePName
, replicatePAIntPrimName, upToPAIntPrimName
, lengthPAName, replicatePAName, emptyPAName, packPAName,
combinePAName ]
\end{code}
...
...
@@ -702,6 +703,9 @@ prTyConName = tcQual nDP_PARRAY FSLIT("PR") prTyConKey
parrayIntPrimTyConName = tcQual nDP_PRIM FSLIT("PArray_Int#")
parrayIntPrimTyConKey
mkPRName = varQual nDP_PARRAY FSLIT("mkPR") mkPRIdKey
replicatePAIntPrimName = varQual nDP_PRIM FSLIT("replicatePA_Int#")
replicatePAIntPrimIdKey
upToPAIntPrimName = varQual nDP_PRIM FSLIT("upToPA_Int#") upToPAIntPrimIdKey
lengthPAName = varQual nDP_PARRAY FSLIT("lengthPA") lengthPAIdKey
replicatePAName = varQual nDP_PARRAY FSLIT("replicatePA") replicatePAIdKey
emptyPAName = varQual nDP_PARRAY FSLIT("emptyPA") emptyPAIdKey
...
...
@@ -1090,6 +1094,8 @@ emptyPAIdKey = mkPreludeMiscIdUnique 133
packPAIdKey = mkPreludeMiscIdUnique 134
combinePAIdKey = mkPreludeMiscIdUnique 135
mkPRIdKey = mkPreludeMiscIdUnique 136
replicatePAIntPrimIdKey = mkPreludeMiscIdUnique 137
upToPAIntPrimIdKey = mkPreludeMiscIdUnique 138
---------------- Template Haskell -------------------
-- USES IdUniques 200-399
...
...
compiler/vectorise/VectBuiltIn.hs
View file @
ee79af08
...
...
@@ -53,6 +53,8 @@ data Builtins = Builtins {
,
applyClosureVar
::
Var
,
mkClosurePVar
::
Var
,
applyClosurePVar
::
Var
,
replicatePAIntPrimVar
::
Var
,
upToPAIntPrimVar
::
Var
,
lengthPAVar
::
Var
,
replicatePAVar
::
Var
,
emptyPAVar
::
Var
...
...
@@ -93,6 +95,8 @@ initBuiltins
applyClosureVar
<-
dsLookupGlobalId
applyClosureName
mkClosurePVar
<-
dsLookupGlobalId
mkClosurePName
applyClosurePVar
<-
dsLookupGlobalId
applyClosurePName
replicatePAIntPrimVar
<-
dsLookupGlobalId
replicatePAIntPrimName
upToPAIntPrimVar
<-
dsLookupGlobalId
upToPAIntPrimName
lengthPAVar
<-
dsLookupGlobalId
lengthPAName
replicatePAVar
<-
dsLookupGlobalId
replicatePAName
emptyPAVar
<-
dsLookupGlobalId
emptyPAName
...
...
@@ -117,6 +121,8 @@ initBuiltins
,
applyClosureVar
=
applyClosureVar
,
mkClosurePVar
=
mkClosurePVar
,
applyClosurePVar
=
applyClosurePVar
,
replicatePAIntPrimVar
=
replicatePAIntPrimVar
,
upToPAIntPrimVar
=
upToPAIntPrimVar
,
lengthPAVar
=
lengthPAVar
,
replicatePAVar
=
replicatePAVar
,
emptyPAVar
=
emptyPAVar
...
...
compiler/vectorise/VectType.hs
View file @
ee79af08
...
...
@@ -297,6 +297,11 @@ arrShapeVars repr = mapM (newLocalVar FSLIT("sh")) =<< arrShapeTys repr
replicateShape
::
Repr
->
CoreExpr
->
CoreExpr
->
VM
[
CoreExpr
]
replicateShape
(
ProdRepr
{})
len
_
=
return
[
len
]
replicateShape
(
SumRepr
{})
len
tag
=
do
rep
<-
builtin
replicatePAIntPrimVar
up
<-
builtin
upToPAIntPrimVar
return
[
len
,
Var
rep
`
mkApps
`
[
len
,
tag
],
Var
up
`
App
`
len
]
arrReprElemTys
::
Repr
->
[[
Type
]]
arrReprElemTys
(
SumRepr
{
sum_components
=
prods
})
...
...
compiler/vectorise/VectUtils.hs
View file @
ee79af08
...
...
@@ -68,7 +68,7 @@ isAnnTypeArg (_, AnnType t) = True
isAnnTypeArg
_
=
False
mkDataConTag
::
DataCon
->
CoreExpr
mkDataConTag
dc
=
mkConApp
intDataCon
[
mkIntLitInt
$
dataConTag
dc
]
mkDataConTag
=
mkIntLitInt
.
dataConTag
splitUnTy
::
String
->
Name
->
Type
->
Type
splitUnTy
s
name
ty
...
...
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