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
8e5442ba
Commit
8e5442ba
authored
Oct 19, 2010
by
Ian Lynagh
Browse files
Define setIdUnfoldingLazily, and use it in Vectorise
Fixes a loop in the compiler, when running the dph tests
parent
6193ff06
Changes
2
Hide whitespace changes
Inline
Side-by-side
compiler/basicTypes/Id.lhs
View file @
8e5442ba
...
...
@@ -76,6 +76,7 @@ module Id (
idOccInfo,
-- ** Writing 'IdInfo' fields
setIdUnfoldingLazily,
setIdUnfolding,
setIdArity,
setIdDemandInfo,
...
...
@@ -119,7 +120,8 @@ import Util( count )
import StaticFlags
-- infixl so you can say (id `set` a `set` b)
infixl 1 `setIdUnfolding`,
infixl 1 `setIdUnfoldingLazily`,
`setIdUnfolding`,
`setIdArity`,
`setIdOccInfo`,
`setIdDemandInfo`,
...
...
@@ -496,6 +498,9 @@ realIdUnfolding :: Id -> Unfolding
-- Expose the unfolding if there is one, including for loop breakers
realIdUnfolding id = unfoldingInfo (idInfo id)
setIdUnfoldingLazily :: Id -> Unfolding -> Id
setIdUnfoldingLazily id unfolding = modifyIdInfo (`setUnfoldingInfoLazily` unfolding) id
setIdUnfolding :: Id -> Unfolding -> Id
setIdUnfolding id unfolding = modifyIdInfo (`setUnfoldingInfo` unfolding) id
...
...
compiler/vectorise/Vectorise.hs
View file @
8e5442ba
...
...
@@ -168,7 +168,7 @@ vectTopBinder var inline expr
vty
<-
vectType
(
idType
var
)
-- Make the vectorised version of binding's name, and set the unfolding used for inlining.
var'
<-
liftM
(`
setIdUnfolding
`
unfolding
)
var'
<-
liftM
(`
setIdUnfolding
Lazily
`
unfolding
)
$
cloneId
mkVectOcc
var
vty
-- Add the mapping between the plain and vectorised name to the state.
...
...
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