summaryrefslogtreecommitdiff
path: root/compiler/vectorise
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2010-09-15 12:44:42 +0000
committersimonpj@microsoft.com <unknown>2010-09-15 12:44:42 +0000
commita51fe79ebcdcb8285573a18f12cade2101533419 (patch)
tree483db14441d3b4f88a40743c9aa1287807026200 /compiler/vectorise
parent0ccc12b6d176efe4a6d605864412deda75b62459 (diff)
downloadhaskell-a51fe79ebcdcb8285573a18f12cade2101533419.tar.gz
Implement INLINABLE pragma
Implements Trac #4299. Documentation to come.
Diffstat (limited to 'compiler/vectorise')
-rw-r--r--compiler/vectorise/Vectorise.hs4
-rw-r--r--compiler/vectorise/Vectorise/Exp.hs2
-rw-r--r--compiler/vectorise/Vectorise/Type/Env.hs2
-rw-r--r--compiler/vectorise/Vectorise/Type/PADict.hs2
-rw-r--r--compiler/vectorise/Vectorise/Utils/Closure.hs2
-rw-r--r--compiler/vectorise/Vectorise/Utils/Hoisting.hs4
6 files changed, 8 insertions, 8 deletions
diff --git a/compiler/vectorise/Vectorise.hs b/compiler/vectorise/Vectorise.hs
index a296e89fe0..8e048333eb 100644
--- a/compiler/vectorise/Vectorise.hs
+++ b/compiler/vectorise/Vectorise.hs
@@ -15,7 +15,7 @@ import Vectorise.Monad
import HscTypes hiding ( MonadThings(..) )
import Module ( PackageId )
import CoreSyn
-import CoreUnfold ( mkInlineRule )
+import CoreUnfold ( mkInlineUnfolding )
import CoreFVs
import CoreMonad ( CoreM, getHscEnv )
import FamInstEnv ( extendFamInstEnvList )
@@ -177,7 +177,7 @@ vectTopBinder var inline expr
return var'
where
unfolding = case inline of
- Inline arity -> mkInlineRule expr (Just arity)
+ Inline arity -> mkInlineUnfolding (Just arity) expr
DontInline -> noUnfolding
diff --git a/compiler/vectorise/Vectorise/Exp.hs b/compiler/vectorise/Vectorise/Exp.hs
index 7831c93e6b..42efe37f96 100644
--- a/compiler/vectorise/Vectorise/Exp.hs
+++ b/compiler/vectorise/Vectorise/Exp.hs
@@ -22,7 +22,7 @@ import Var
import VarEnv
import VarSet
import Id
-import BasicTypes
+import BasicTypes( isLoopBreaker )
import Literal
import TysWiredIn
import TysPrim
diff --git a/compiler/vectorise/Vectorise/Type/Env.hs b/compiler/vectorise/Vectorise/Type/Env.hs
index 8e26ed9788..06bd789027 100644
--- a/compiler/vectorise/Vectorise/Type/Env.hs
+++ b/compiler/vectorise/Vectorise/Type/Env.hs
@@ -182,7 +182,7 @@ vectDataConWorkers orig_tc vect_tc arr_tc
raw_worker <- cloneId mkVectOcc orig_worker (exprType body)
let vect_worker = raw_worker `setIdUnfolding`
- mkInlineRule body (Just arity)
+ mkInlineUnfolding (Just arity) body
defGlobalVar orig_worker vect_worker
return (vect_worker, body)
where
diff --git a/compiler/vectorise/Vectorise/Type/PADict.hs b/compiler/vectorise/Vectorise/Type/PADict.hs
index ef5c8d58c9..d3d2213e67 100644
--- a/compiler/vectorise/Vectorise/Type/PADict.hs
+++ b/compiler/vectorise/Vectorise/Type/PADict.hs
@@ -56,7 +56,7 @@ buildPADict vect_tc prepr_tc arr_tc repr
let body = mkLams (tvs ++ args) expr
raw_var <- newExportedVar (method_name name) (exprType body)
let var = raw_var
- `setIdUnfolding` mkInlineRule body (Just (length args))
+ `setIdUnfolding` mkInlineUnfolding (Just (length args)) body
`setInlinePragma` alwaysInlinePragma
hoistBinding var body
return var
diff --git a/compiler/vectorise/Vectorise/Utils/Closure.hs b/compiler/vectorise/Vectorise/Utils/Closure.hs
index b70ecb4584..6b8688c7d9 100644
--- a/compiler/vectorise/Vectorise/Utils/Closure.hs
+++ b/compiler/vectorise/Vectorise/Utils/Closure.hs
@@ -24,7 +24,7 @@ import TyCon
import DataCon
import MkId
import TysWiredIn
-import BasicTypes
+import BasicTypes( Boxity(..) )
import FastString
diff --git a/compiler/vectorise/Vectorise/Utils/Hoisting.hs b/compiler/vectorise/Vectorise/Utils/Hoisting.hs
index 9cce4161d2..12b1b6fe4f 100644
--- a/compiler/vectorise/Vectorise/Utils/Hoisting.hs
+++ b/compiler/vectorise/Vectorise/Utils/Hoisting.hs
@@ -22,7 +22,7 @@ import CoreUnfold
import Type
import Var
import Id
-import BasicTypes
+import BasicTypes( Arity )
import FastString
import Control.Monad
@@ -58,7 +58,7 @@ hoistExpr fs expr inl
where
mk_inline var = case inl of
Inline arity -> var `setIdUnfolding`
- mkInlineRule expr (Just arity)
+ mkInlineUnfolding (Just arity) expr
DontInline -> var