projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Enable shortcutting of stack squeezing
[ghc-hetmet.git]
/
ghc
/
compiler
/
cprAnalysis
/
CprAnalyse.lhs
diff --git
a/ghc/compiler/cprAnalysis/CprAnalyse.lhs
b/ghc/compiler/cprAnalysis/CprAnalyse.lhs
index
8ca265f
..
dad6ccb
100644
(file)
--- a/
ghc/compiler/cprAnalysis/CprAnalyse.lhs
+++ b/
ghc/compiler/cprAnalysis/CprAnalyse.lhs
@@
-14,7
+14,7
@@
module CprAnalyse ( cprAnalyse ) where
import DynFlags ( DynFlags, DynFlag(..) )
import CoreLint ( showPass, endPass )
import CoreSyn
import DynFlags ( DynFlags, DynFlag(..) )
import CoreLint ( showPass, endPass )
import CoreSyn
-import CoreUtils ( exprIsValue )
+import CoreUtils ( exprIsHNF )
import Id ( Id, setIdCprInfo, idCprInfo, idArity,
isBottomingId, idDemandInfo, isImplicitId )
import IdInfo ( CprInfo(..) )
import Id ( Id, setIdCprInfo, idCprInfo, idArity,
isBottomingId, idDemandInfo, isImplicitId )
import IdInfo ( CprInfo(..) )
@@
-273,7
+273,7
@@
addIdCprInfo bndr rhs absval
Fun _ -> idArity bndr >= n_fun_tys absval
-- Enough visible lambdas
Fun _ -> idArity bndr >= n_fun_tys absval
-- Enough visible lambdas
- Tuple -> exprIsValue rhs || isStrict (idDemandInfo bndr)
+ Tuple -> exprIsHNF rhs || isStrict (idDemandInfo bndr)
-- If the rhs is a value, and returns a constructed product,
-- it will be inlined at usage sites, so we give it a Tuple absval
-- If it isn't a value, we won't inline it (code/work dup worries), so
-- If the rhs is a value, and returns a constructed product,
-- it will be inlined at usage sites, so we give it a Tuple absval
-- If it isn't a value, we won't inline it (code/work dup worries), so