Skip to content
GitLab
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
0873e46c
Commit
0873e46c
authored
Dec 13, 2007
by
rl@cse.unsw.edu.au
Browse files
Treat some standard data cons specially during vectorisation
This is a temporary hack which allows us to vectorise literals.
parent
a41bfc02
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/vectorise/Vectorise.hs
View file @
0873e46c
...
...
@@ -243,6 +243,17 @@ vectExpr e@(_, AnnApp _ arg)
where
(
fn
,
tys
)
=
collectAnnTypeArgs
e
vectExpr
(
_
,
AnnApp
(
_
,
AnnVar
v
)
(
_
,
AnnLit
lit
))
|
Just
con
<-
isDataConId_maybe
v
,
is_special_con
con
=
do
let
vexpr
=
App
(
Var
v
)
(
Lit
lit
)
lexpr
<-
liftPA
vexpr
return
(
vexpr
,
lexpr
)
where
is_special_con
con
=
con
`
elem
`
[
intDataCon
,
floatDataCon
,
doubleDataCon
]
vectExpr
(
_
,
AnnApp
fn
arg
)
=
do
arg_ty'
<-
vectType
arg_ty
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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